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 the life cycle of an asp.net page?
How about the security in Activex DLL and Activex EXE ?
what is a .xap file? Explain with an example.
Why mvc is better than asp.net? : Asp.Net MVC
What are the advantages of using sql stored procedures instead of adhoc sql queries in an asp.net web application?
How much is the pay-for-use service if I chose not to use microsoft-sponsored advertising?
How to prepare culture-specific formatting in .net.
What is global.asax file used for?
What is the significance of attaching a profile while creating a user?
Describe in brief .net framework and its components.
Can we add code files of different languages in app_code folder?
How can we update records in gridview?Is there any appropriate code for it?
What is the difference between the asp and asp.net?
What is http request and response?
What is bson in web api?