Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    Warrington, Cheshire
    Posts
    355
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Redirect to blank window (vb)

    I am trying to redirect the user to a sub chart (read gif in page) but am having difficulty finding how to open a blank window.
    The link uses the already posted query response as part of the url:-
    <pre>Private Sub G1_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs)
    Handles G1.ServerClick
    'send the user to view the current client refs budget graph
    Dim strClient As String
    Dim url as String
    strClient = Request.QueryString("id")

    'forward to graph page
    url = "graphs.aspx?id=" & strClient
    Response.Redirect(url)
    End Sub
    </pre>


    I have tried changing the Frame target to _Blank but this returns "page cannot be displayed".

    Any help would be appreciated

    Thanks
    Alan

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Redirect to blank window (vb)

    You've hit upon a long-time challenge of server-side development : interacting with client-side scripting.

    In order to open an external window following a server-side event, you're going to have to tap into client-side script. There are multiple ways to do this. I haven't yet explored the "new" tools in .NET 2.0 for this, but in 1.1 I would usually generate some script and assign it to the the Page.RegisterStartupScript method. You'll need to use the javascript window.open() method to make this happen.

    Hope this helps.

Posting Permissions

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