How do you add a javascript function for a link button in a
datagrid ?

Answer Posted / vidit tyagi

you can add a javascript function in the link button of the
datagrid under the itemdatabound event as below


linkbutton linkbtn=(linkbutton)( e.item.findcontrol
("linkbtnname"))
linkbtn.attribute.add("onclick",javascript:returnfuctionname
()");

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is session id in web application?

797


What is asp.net web pages?

743


What are the advantages of using Master Pages?

804


What is the adavantage of using ASP.NET routing?

888


What is the difference between a default skin and a named skin?

851


What is asp.net futures?

779


What is difference between mvc and asp.net? : Asp.Net MVC

838


What is postback request?

755


What is Cookies Less Session?

820


if i wanna deploy my asp.net project to the production server and situation is that i m still not compiled my project i have as-is on my development side now on production server we dont have a visual studio now what kind of settings i need to be to do in webconfig /machine.config file to deploy my project and in iis too....

1875


What are html helpers in asp.net?

802


Define view state.

756


What is a SESSION and APPLICATION object?

791


Explain login controls.

831


What is redirecting behavior?

744