How do you add a javascript function for a link button in a
datagrid?
Answer Posted / 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 |
Post New Answer View All Answers
What are the modes of updation in an updatepanel?
What are demand-paging and pre-paging?
What are the ways to sending the data in ASP.NET page?
Which validator control you use if you need to make sure the values in two different controls matched?
When using the Pager object, inorder to know which page to go, which property you have to set to grid?
Describe in brief .net framework and its components.
Write code to send e-mail from an asp.net application?
What is a runtime version?
If you are using two select queries and retrieving data. how do you access second query's result set using data reader?
What is Partial PostBack in ASP.NET?
How does windows service lifecycle differ from a .standard. Exe?
Using code explain Configuration Management
what is publisher?
What are custom user controls in asp.net?
What is special types forms