Conditional doPostBack on Datagrid

Discussion in 'ASP .Net Datagrid Control' started by Whale Skinner, Aug 30, 2004.

  1. I have a ButtonColumn on my datagrid that I would like to post back
    conditionally. What I would like to see is a JavaScript confirm
    message that only posts the page when they click the Yes or OK button.

    Is that possible? If so, how?

    Thank you much
     
    Whale Skinner, Aug 30, 2004
    #1
    1. Advertising

  2. RechargeButton.Attributes.Add("onClick", "event.returnValue=confirm('Are you
    sure you wish to recharge this credit
    card?');document.body.style.cursor='wait';");

    where rechargeButton is your webserver control. This code goes in the
    page_load routine
    --
    Regards,
    Alvin Bruney
    [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
    Got tidbits? Get it here... http://tinyurl.com/27cok
    "Whale Skinner" <> wrote in message
    news:...
    >I have a ButtonColumn on my datagrid that I would like to post back
    > conditionally. What I would like to see is a JavaScript confirm
    > message that only posts the page when they click the Yes or OK button.
    >
    > Is that possible? If so, how?
    >
    > Thank you much
     
    Alvin Bruney [MVP], Aug 30, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Timothy Kelley

    calling doPostBack not working

    Timothy Kelley, Jul 18, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    760
  2. Johno

    doPostBack client-side function

    Johno, Jul 18, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    7,794
    Johno
    Jul 21, 2003
  3. Matt Petteys
    Replies:
    0
    Views:
    485
    Matt Petteys
    Aug 14, 2003
  4. jm

    Dopostback Paging Question

    jm, Oct 30, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    361
  5. Alec S.
    Replies:
    10
    Views:
    10,225
    Alec S.
    Apr 16, 2005
Loading...

Share This Page