You need to get it to work with javascript, because you need to get
the confirmation to happen on the client side. The delete code on the
server only gets called if the user says yes.

Check out, which uses a template column, but shows in excruiating
detail what needs to happen...
http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=228

Or, a much simpler approach, that arrives at the same destintation. 
Your server code adds the javascript at runtime when you bind the
grid...

http://www.aspit.net/code/net/confirm_datagrid_delete.asp

There are also a bunch of examples in tha archives of this group.

On 8/22/05, les_claypoo1 <[EMAIL PROTECTED]> wrote:
> I have a datagrid set up with an asp:ButtonColumn that is set up to
> delete the record.  Right now I have the 'OnDeleteCommand' set to an
> asp.net(vb) sub.  Which then deletes the record.  I want to display a
> simple confirmation box with yes or no.  Any help?
> -all the examples I find don't fit my situation plus I can seem to get
> it to work with javascript since it is serverside stuff.
> 
> 
> 
> 
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 
> 


-- 
Dean Fiala
Very Practical Software, Inc
http://www.vpsw.com


------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hq80omr/M=362131.6882499.7825260.1510227/D=groups/S=1705006764:TM/Y=YAHOO/EXP=1124771699/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to