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
Define the types of configuration files.
Why we use asp.net for website development?
List all templates of the repeater control.
Why viewstate is used in asp.net?
If 200 is for all successful operation then why do we have 201 response codes?
How to display Alert in ASP.NET
What is cas?
Explain how caching in asp.net 2.0 is different from caching in asp.net 1.1?
Describe the diffeerence between inline and code behind - which is best in a loosely coupled solution?
What is preprocessor in .net? Where it use?
How does the cookies work in asp.net?
What does aspcompat="true" mean?
What is cross page posting? How is it done?
Define tracing.
Dataset is the disconnected environment. suppose if you are binding records to gridview (disconnected environment) and you are making changes to the the grid but before updating the database if any other user modify the data, how will you avoid such problem?