Displaying warning messages...

Discussion in 'ASP .Net' started by =?Utf-8?B?SXJmYW4gQWtyYW0=?=, Dec 27, 2004.

  1. Hi Guys,

    I was wondering if you can help me with this question. I am trying to
    display warning messages on my web-page, prompting the user to check his
    action, and confirm what the current action would do. What is the best way of
    doing that in asp.net. I know that we can do that easily in windows
    programming, but I am not too sure in Web Programming. Will wait for a
    response, and will value your responses.

    Thanks,

    Irfan
    =?Utf-8?B?SXJmYW4gQWtyYW0=?=, Dec 27, 2004
    #1
    1. Advertising

  2. Here's some server side code that uses javascript to display a confirmation
    message.
    myDeleteButton.Attributes.Add("onclick", _
    "return confirm('Are you sure you want to delete?');")

    In this example, the Delete button will post back only if the person
    confirms they want to delete. Otherwise your server code is never called in
    response to the button click.

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://Steve.Orr.net


    "Irfan Akram" <> wrote in message
    news:...
    > Hi Guys,
    >
    > I was wondering if you can help me with this question. I am trying to
    > display warning messages on my web-page, prompting the user to check his
    > action, and confirm what the current action would do. What is the best way
    > of
    > doing that in asp.net. I know that we can do that easily in windows
    > programming, but I am not too sure in Web Programming. Will wait for a
    > response, and will value your responses.
    >
    > Thanks,
    >
    > Irfan
    Steve C. Orr [MVP, MCSD], Dec 27, 2004
    #2
    1. Advertising

  3. Hi Mr.Steve,

    First of all many thanks for your kind response. The thing is that I am
    trying to control the user's action of deselecting a checkbox, once he has
    selected it. Also the checkbox has been generated dynamically. If it is
    selected I do some other processing, so if it is then deselected then the
    whole page has to be resetted, hence the sense of displaying the warning
    message. The problem is that I dont want the warning message to be displayed
    when it is deselected, but only when it is deselected. Hope you understand
    me....

    Hope you have.....will wait for your kind reply...

    Many thanks,

    Irfan

    "Steve C. Orr [MVP, MCSD]" wrote:

    > Here's some server side code that uses javascript to display a confirmation
    > message.
    > myDeleteButton.Attributes.Add("onclick", _
    > "return confirm('Are you sure you want to delete?');")
    >
    > In this example, the Delete button will post back only if the person
    > confirms they want to delete. Otherwise your server code is never called in
    > response to the button click.
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://Steve.Orr.net
    >
    >
    > "Irfan Akram" <> wrote in message
    > news:...
    > > Hi Guys,
    > >
    > > I was wondering if you can help me with this question. I am trying to
    > > display warning messages on my web-page, prompting the user to check his
    > > action, and confirm what the current action would do. What is the best way
    > > of
    > > doing that in asp.net. I know that we can do that easily in windows
    > > programming, but I am not too sure in Web Programming. Will wait for a
    > > response, and will value your responses.
    > >
    > > Thanks,
    > >
    > > Irfan

    >
    >
    >
    =?Utf-8?B?SXJmYW4gQWtyYW0=?=, Dec 27, 2004
    #3
    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. Priyanka AGARWAL
    Replies:
    2
    Views:
    506
    Andrew Thompson
    Jan 31, 2005
  2. Priyanka AGARWAL
    Replies:
    1
    Views:
    302
    Andrew Thompson
    Feb 2, 2005
  3. Priyanka AGARWAL
    Replies:
    0
    Views:
    294
    Priyanka AGARWAL
    Feb 1, 2005
  4. RC
    Replies:
    4
    Views:
    9,091
    Tjerk Wolterink
    Jun 30, 2005
  5. Dave
    Replies:
    0
    Views:
    357
Loading...

Share This Page