Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot get Delete Verification to work
Message
General information
Forum:
ASP.NET
Category:
WebForms
Title:
Cannot get Delete Verification to work
Miscellaneous
Thread ID:
01173548
Message ID:
01173548
Views:
60
I'm trying to put a "Are you sure you want to delete?" message on a gridview in ASP.NET 2.0 and have followed the method described in MSDN where you put a linkbutton inside of a template column and then call the onclick;

asp:TemplateField>
ItemTemplate>
asp:LinkButton ID="LinkButton1" Runat="server"
OnClientClick="return confirm('Are you sure you
want to delete this record?');"
CommandName="Delete">Delete This User
/ItemTemplate>
/asp:TemplateField>

NOTE: I had to leave off the opening braces or the code would not appear.

But, it doesn't work. The postback happens immediately and the dialog box that should appear never does.

Am I missing a library or a reference in the web.config? It seems straight forward, but so far no luck.

Dick Harrold
=========================================
Dick Harrold [DickHarrold@Yahoo.com]
Next
Reply
Map
View

Click here to load this message in the networking platform