Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot get Delete Verification to work
Message
Information générale
Forum:
ASP.NET
Catégorie:
WebForms
Titre:
Cannot get Delete Verification to work
Divers
Thread ID:
01173548
Message ID:
01173548
Vues:
61
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]
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform