Make a server side but put up a Confirm MsgBox

Discussion in 'ASP .Net Web Controls' started by Rod, Mar 12, 2007.

  1. Rod

    Rod Guest

    I have a server side button that deletes something. I want to put up a
    Confirm MsgBox that says "Do you really want to delete this?"
    I know how to make a client side button put up this message but I can't see
    how to get a server side button to do it.

    Many thanks in advance
    Rod
     
    Rod, Mar 12, 2007
    #1
    1. Advertising

  2. Rod

    Rod Guest

    Easy when you know how.

    thanks




    "David Longnecker" <> wrote in message
    news:...
    > In your code behind, you can still use JavaScript.
    >
    > Given you have a button object called btnDelete:
    >
    > Add the following to your Page_Load.
    >
    > btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want
    > to delete?');");
    >
    > -dl
    >
    > ---
    > David Longnecker
    > Web Developer
    > http://blog.tiredstudent.com
    >
    >> I have a server side button that deletes something. I want to put up a
    >> Confirm MsgBox that says "Do you really want to delete this?"
    >> I know how to make a client side button put up this message but I
    >> can't see
    >> how to get a server side button to do it.
    >> Many thanks in advance
    >> Rod

    >
    >
     
    Rod, Mar 12, 2007
    #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. kong

    Re: confirm msgbox in asp.net

    kong, Aug 27, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,350
  2. Edward Yang
    Replies:
    7
    Views:
    343
    =?Utf-8?B?TmVvIFRoZSBPbmU=?=
    Jan 26, 2005
  3. =?Utf-8?B?VEo=?=

    JavaScript Confirm msgbox...

    =?Utf-8?B?VEo=?=, Oct 3, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    12,000
    =?Utf-8?B?U3JlZWppdGggUmFt?=
    Oct 3, 2005
  4. =?Utf-8?B?SlQ=?=
    Replies:
    0
    Views:
    2,168
    =?Utf-8?B?SlQ=?=
    Mar 21, 2006
  5. momo
    Replies:
    2
    Views:
    788
Loading...

Share This Page