Open Another webform without closing the current webform ?

Discussion in 'ASP .Net' started by Luqman, Apr 9, 2007.

  1. Luqman

    Luqman Guest

    How can I open another WebForm in ASP.Net / VS 2005 without closing the
    Current Webform.

    I tried using Server.Transfer("Form2.Aspx",True) on Button_Click of Form1
    but it close the current web form and opened the form2, and when I click on
    the button on form2 which had Server.Transfer("Form1.Aspx"), the form1
    initialized and all the values of form1 controls set to blank, any idea
    please ?

    My Form1 has some textboxes and a search Button. The Search Button is used
    to open another form and search for particular Item Code, and then click on
    that Item Code and come back to form1 without closing the form1.

    Any idea please ?

    Best Regards,

    Luqman
     
    Luqman, Apr 9, 2007
    #1
    1. Advertising

  2. Luqman

    Mark Rae Guest

    "Luqman" <> wrote in message
    news:...

    > How can I open another WebForm in ASP.Net / VS 2005 without closing the
    > Current Webform.


    For this you will need to open a second window client-side using JavaScript:
    http://www.google.co.uk/search?sour...GGLG:2006-28,GGLG:en&q=JavaScript window.open

    Or, if you can be certain that all your users will be using Microsoft
    Internet Explorer, you could use window.showModalDialog:
    http://www.google.co.uk/search?hl=e...:en&q=JavaScript window.showModalDialog&meta=

    You can refer to the controls on the first window by using the window.opener
    object in the second window:
    http://www.google.co.uk/search?hl=en&rls=GGLG,GGLG:2006-28,GGLG:en&q=JavaScript window.opener&meta=
     
    Mark Rae, Apr 9, 2007
    #2
    1. Advertising

  3. The JavaScript window.open method is a common solution.
    Here's more info:
    http://SteveOrr.net/articles/ClientSideSuite.aspx
    http://msdn.microsoft.com/library/d...hop/author/dhtml/reference/methods/open_0.asp

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


    "Luqman" <> wrote in message
    news:...
    > How can I open another WebForm in ASP.Net / VS 2005 without closing the
    > Current Webform.
    >
    > I tried using Server.Transfer("Form2.Aspx",True) on Button_Click of Form1
    > but it close the current web form and opened the form2, and when I click
    > on the button on form2 which had Server.Transfer("Form1.Aspx"), the form1
    > initialized and all the values of form1 controls set to blank, any idea
    > please ?
    >
    > My Form1 has some textboxes and a search Button. The Search Button is used
    > to open another form and search for particular Item Code, and then click
    > on that Item Code and come back to form1 without closing the form1.
    >
    > Any idea please ?
    >
    > Best Regards,
    >
    > Luqman
    >
    >
    >
    >
    >
    >
     
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider], Apr 11, 2007
    #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. =?Utf-8?B?bXN1aw==?=

    Using one webform to set a value on another webform

    =?Utf-8?B?bXN1aw==?=, Jul 12, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    504
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Jul 12, 2006
  2. =?Utf-8?B?Vk1J?=

    Closing popup window when closing parent window?

    =?Utf-8?B?Vk1J?=, Feb 14, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    666
    Thomas Hansen
    Feb 15, 2007
  3. Paul
    Replies:
    6
    Views:
    3,134
    A6034447
    Nov 26, 2009
  4. thomas
    Replies:
    0
    Views:
    241
    thomas
    Oct 23, 2003
  5. Replies:
    7
    Views:
    231
    Henry
    Sep 25, 2007
Loading...

Share This Page