Re: Retrieving Msgbox Values From Client

Discussion in 'ASP .Net' started by Steve C. Orr [MVP, MCSD], May 12, 2004.

  1. Here's some server side code that outputs javascript similar to what you are
    requesting:
    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


    "Jon" <admin(take this out)@jonhickman.com> wrote in message
    news:...
    > Hi,
    > I have the following code behind the click event of a button on an ASP.Net

    page...
    >
    > Dim sMessage As String
    >
    > sMessage = "<script language=VBScript>" &

    System.Environment.NewLine
    > sMessage += " " & "Dim iMsgBoxValue" &

    System.Environment.NewLine
    > sMessage += "iMsgBoxValue = Msgbox('Send This Message?',

    vbYesNoCancel + vbQuestion)" & System.Environment.NewLine
    > sMessage += System.Environment.NewLine
    > sMessage += "</script>"
    > sMessage = Replace(sMessage, "'", """")
    > RegisterClientScriptBlock("script1", sMessage)
    >
    > Very simple, displays a msgbox.
    >
    > QUESTION: How do I pull the value of iMsgBoxValue out of the client

    script?? In other words, how can I determine what button (Yes, No, Cancel)
    the client clicked?? It has got to be simple, but I cant find the answer.
    >
    > Thanks for any help,
    >
    > Jon
     
    Steve C. Orr [MVP, MCSD], May 12, 2004
    #1
    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. Mark Newby
    Replies:
    1
    Views:
    1,731
  2. Alex Papadimoulis

    Re: Retrieving Msgbox Values From Client

    Alex Papadimoulis, May 12, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    412
    Alex Papadimoulis
    May 12, 2004
  3. Peter Rilling

    Re: Retrieving Msgbox Values From Client

    Peter Rilling, May 12, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    407
    Peter Rilling
    May 12, 2004
  4. user
    Replies:
    0
    Views:
    393
  5. user
    Replies:
    0
    Views:
    191
Loading...

Share This Page