Message
General information
Fórum:
ASP.NET
Category:
Título:
Cannot get Delete Verification to work
Miscellaneous
ID da thread:
01173548
ID da mensagem:
01173548
Views:
62
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
Responder
Mapa
View