How do you add a javascript function for a link button in a
datagrid?
Answers were Sorted based on User's Feedback
Answer / ish
Make object of particular button
Ex:
LinkButton lnbDelete=(LinkButton) e.Item.FindControl
("Delete");
After that we can use it with JavaScript:
lnbDelete.Attributes.Add("Onclick","javascript:return
confirm('Are you sure you want to delete this?');");
Is This Answer Correct ? | 8 Yes | 2 No |
Answer / 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 |
what are the application layers for a distribute application?
What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
What kind of data can be stored in viewstate?
What is Hybrid dictionary
What is webresource axd?
what are the server controls used in sitepath navigation?
What is Web API?
Can you use c# without .net?
what r the Templeats in ASP.net?
What’s difference between “optimistic” and “pessimistic” locking?
What are the differences between code behind and code inline?
Why session is used in asp.net?