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 |
List the asp.net validation controls?
Which is better viewstate or session?
What are the different methods of session maintenance in asp.net?
What are validator? Name the validation controls in asp.net? How do you disable them? Will the asp.net validators run in server side or client side? How do you do client-side validation in .net? How to disable validator control by client side javascript?
Which tab of the web site administration tool do you use to manage application setting ,debug and tracing?
Derive WSDL?
In Data grid the question is below quantity price total these are 3 fields available in data grid if you enter quantity the total has to update automatically.Price field is already filled completely
What is asp.net web pages?
what exception is thrown when you do a response.redirect
Why session management is required?
What is the difference between a cookie and a pixel?
What is the Custom Error in ASP.NET?
2 Answers ABB, IBM, Infosys, Tech Mahindra,
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)