Opening New Window through code

Discussion in 'ASP .Net' started by =?Utf-8?B?RGV2aW4=?=, Apr 22, 2004.

  1. I want to open a new window through code. Can someone provide me with an example or point me to one in the VB.Net language. Thank

    Devin
     
    =?Utf-8?B?RGV2aW4=?=, Apr 22, 2004
    #1
    1. Advertising

  2. You can open a new window using javascript such as this:
    a=window.open('MyPage.aspx','MyWindow')
    There are all kinds of options for setting window properties such as window
    size and toolbar visibility.
    Here's more info:
    http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.asp

    You can use the RegisterClientScriptBlock or RegisterStartupScript
    functions to help you output the javascript from your server code.
    Here's more info on these:
    http://msdn.microsoft.com/library/d...UIPageClassRegisterClientScriptBlockTopic.asp
    http://msdn.microsoft.com/library/d...mWebUIPageClassRegisterStartupScriptTopic.asp

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


    "Devin" <> wrote in message
    news:...
    > I want to open a new window through code. Can someone provide me with an

    example or point me to one in the VB.Net language. Thanks
    >
    > Devin
     
    Steve C. Orr [MVP, MCSD], Apr 22, 2004
    #2
    1. Advertising

  3. =?Utf-8?B?RGV2aW4=?=

    Kevin Guest

    What actual code can I put in the Button_Click event to open another
    form in my project? (ASP.NET using VB.NET)


    On Thu, 22 Apr 2004 15:16:50 -0700, "Steve C. Orr [MVP, MCSD]"
    <> wrote:

    >You can open a new window using javascript such as this:
    >a=window.open('MyPage.aspx','MyWindow')
    >There are all kinds of options for setting window properties such as window
    >size and toolbar visibility.
    >Here's more info:
    >http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.asp
    >
    >You can use the RegisterClientScriptBlock or RegisterStartupScript
    >functions to help you output the javascript from your server code.
    >Here's more info on these:
    >http://msdn.microsoft.com/library/d...UIPageClassRegisterClientScriptBlockTopic.asp
    >http://msdn.microsoft.com/library/d...mWebUIPageClassRegisterStartupScriptTopic.asp
     
    Kevin, Apr 23, 2004
    #3
  4. =?Utf-8?B?RGV2aW4=?=

    Kevin Guest

    Doesn't anyone know the answer to this question?


    On Fri, 23 Apr 2004 19:30:04 GMT, Kevin <kevinp@remove_cfl.rr.com>
    wrote:

    >What actual code can I put in the Button_Click event to open another
    >form in my project? (ASP.NET using VB.NET)
    >
    >
    >On Thu, 22 Apr 2004 15:16:50 -0700, "Steve C. Orr [MVP, MCSD]"
    ><> wrote:
    >
    >>You can open a new window using javascript such as this:
    >>a=window.open('MyPage.aspx','MyWindow')
    >>There are all kinds of options for setting window properties such as window
    >>size and toolbar visibility.
    >>Here's more info:
    >>http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.asp
    >>
    >>You can use the RegisterClientScriptBlock or RegisterStartupScript
    >>functions to help you output the javascript from your server code.
    >>Here's more info on these:
    >>http://msdn.microsoft.com/library/d...UIPageClassRegisterClientScriptBlockTopic.asp
    >>http://msdn.microsoft.com/library/d...mWebUIPageClassRegisterStartupScriptTopic.asp
     
    Kevin, Apr 28, 2004
    #4
  5. I gave you all the pieces you need but I'm sorry I don't have time to put
    them together for you.
    I hope you can deal with a C# example:
    http://www.codeguru.com/Csharp/.NET/net_asp/scripting/article.php/c5337/

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


    "Kevin" <kevinp@remove_cfl.rr.com> wrote in message
    news:...
    > Doesn't anyone know the answer to this question?
    >
    >
    > On Fri, 23 Apr 2004 19:30:04 GMT, Kevin <kevinp@remove_cfl.rr.com>
    > wrote:
    >
    > >What actual code can I put in the Button_Click event to open another
    > >form in my project? (ASP.NET using VB.NET)
    > >
    > >
    > >On Thu, 22 Apr 2004 15:16:50 -0700, "Steve C. Orr [MVP, MCSD]"
    > ><> wrote:
    > >
    > >>You can open a new window using javascript such as this:
    > >>a=window.open('MyPage.aspx','MyWindow')
    > >>There are all kinds of options for setting window properties such as

    window
    > >>size and toolbar visibility.
    > >>Here's more info:

    >
    >>http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.a

    sp
    > >>
    > >>You can use the RegisterClientScriptBlock or RegisterStartupScript
    > >>functions to help you output the javascript from your server code.
    > >>Here's more info on these:

    >
    >>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/htm

    l/frlrfSystemWebUIPageClassRegisterClientScriptBlockTopic.asp
    >
    >>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/htm

    l/frlrfSystemWebUIPageClassRegisterStartupScriptTopic.asp
    >
     
    Steve C. Orr [MVP, MCSD], Apr 28, 2004
    #5
    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. Patrick Olurotimi Ige

    Closing child window when opening a new Window

    Patrick Olurotimi Ige, Dec 14, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    461
    Patrick Olurotimi Ige
    Dec 14, 2004
  2. POL8985
    Replies:
    1
    Views:
    587
    Kevin Spencer
    Jan 31, 2005
  3. UJ
    Replies:
    2
    Views:
    7,591
    John Timney \(ASP.NET MVP\)
    Jun 27, 2005
  4. Clara
    Replies:
    6
    Views:
    614
    Clara
    Apr 25, 2005
  5. Allan
    Replies:
    1
    Views:
    122
    Randy Webb
    Aug 6, 2004
Loading...

Share This Page