Results 1 to 2 of 2

Thread: [2005] Need help with pop-up

  1. #1
    Fanatic Member
    Join Date
    Jun 05
    Posts
    625

    [2005] Need help with pop-up

    I need a pop up to show in a button click statement right before a redirect. How can I do this? VS 2005 / .NET 2.0.

    Sub MyButton_Click...

    ' Do stuff

    ' Display pop-up , wait for user to click 'OK'

    Response.Redirect("newpage.aspx");

    End Sub

  2. #2
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 02
    Location
    Joburg, RSA
    Posts
    1,724

    Re: [2005] Need help with pop-up

    Ok, that code will run on the server - the server simply can't display dialogs directly on the client, but can generate client-side script that will do so.

    Code:
    Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load ''' Or something like that - C#'r...
      myButton.Attributes.Add("onclick", "alert('Some message'); return true;")
    End Sub
    
    Sub MyButton_Click(sender As Object, e As EventArgs)
      Response.Redirect("newpage.aspx")
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •