How do you add a javascript function for a link button in a
datagrid?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / krishna prasad
in databound event
foreach(dataview/datagrid items)
{
find the linkbutton(objLinkButton) row.findcontrl
("LinkButtonID")
objLinkButton.attributes.add("onClick","return "validates
();")
}
| Is This Answer Correct ? | 4 Yes | 1 No |
What is the asp.net control toolkit?
How do we ensure view state has not tampered?
Can we handle the error and redirect to some pages using web.config?
What are the new login controls in asp.net 2.0?
Explain the difference between AutoPostBack and IspostBack in ASP.NET?
0 Answers Sans Pareil IT Services,
What is a web api endpoint?
how we can solve machine key error in asp.net?
What object is used to encapsulate a rowset? a) DataSet b) DataAdapter c) DataRowSet d) DataTable
Which method is used to force all the validation controls to run?
What are the main advantages of using asp.net?
Why select Web API?
what is the difference between this.controls and page.form1.controls and me.controls?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)