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 machine.config in .net?
What is scope of an application variable in asp.net?
What types of data validation events are commonly seen in the client-side form validation?
Can I recieve both html markup for page and code in the asp.net web page's source code portion in the web browser?
What is the use of execute non query in asp.net?
Briefly describe the role of global.asax?
List the major built-in objects in asp.net?
What is rending process in ASP.NET?
In ViewState How much lifespan items stored?
What are the difference between function and stored procedure in .net programming language?
How you can manage the state of application at the server side in ASP.NET?
List down the sequence of methods called during the page load.
What are the session management techniques asp net?
What is in a session cookie?
How many types of sessions are there in asp net?