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

Answer Posted / krishna prasad

in databound event
foreach(dataview/datagrid items)
{
find the linkbutton(objLinkButton) row.findcontrl
("LinkButtonID")
objLinkButton.attributes.add("onClick","return "validates
();")
}

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many ways are there to maintain a state in .net? What is view state?

592


Is it possible to create web application with both webforms and mvc?

542


what is command line compiler.what are the steps and how it is related to debugging.

1417


What is ViewState? What does the "EnableViewState" property do? Why would I want it on or off?

662


Give 2 examples for scenarios when routing is not applied?

605






Why asp.net is better than php?

492


Why is global asax is used for?

520


Define static function?

570


What are url fragments?

508


Can you explain composite pattern?

594


What is dynamic web page with example?

528


In your ASP.NET 2.0 web application you want to display an image that is selected from a collection of images. What approach will you use to implementing this?

569


Why would anyone need to implement their own hashtable or linked list?

2440


Define common type system?

587


What is server infrastructure?

617