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 is server side routing?
What is the file through which you can customize your asp.net application?
Is viewstate secure?
Explain how do you validate the controls in an asp .net page?
In which event of the page life cycle, is the viewstate available?
How to bind all the binding controls in a page at once in ASP.NET?
Explain about consistent programming model in the .NET framework?
What are the differences between clr & cts?
What is Forms Authentication in ASP.NET?
Can you nest updatepanel within each other?
How many types of cache are there?
Why Unload event of MasterPage Calls first in ASP.net ?
Give an example of what might be best suited to place in the application_start and session_start subroutines?
What is distributed system in asp.net?
Why we use content place holder in asp.net?