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 |
Dategrid filtering and sorting How can we sort all the fields at once?
What language is asp.net written in?
how we can solve machine key error in asp.net?
Describe the .net base class library.
Where does Web.Config Info stored? Will this be stored in the registry?
How can we prevent browser from caching an aspx page?
what are the ihttphandler and ihttphandlerfactory interfaces ?
can I use session variable in App_code Class page??
Is it possible to create web application with both webforms and mvc?
Which two new properties are added in asp.net 4.0 page class?
what is the differance between native code & managed code?
Explain the asp.net mvc request life cycle? : asp.net mvc
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)