ASP.NET button that calls another webform in a pop-up --- please help!!

Discussion in 'ASP .Net' started by almurph@altavista.com, Jul 6, 2007.

  1. Guest

    Hi everyone,


    I have an APS.NET (v1.1) type button on a webform page. What I want
    it to do is when the user clicks it, it then calls another webform
    page that appears in a pop-up window.
    Now I know that the button has an "onclick" attribute but that's as
    far as I get. I guess you need some Javascript and something in the
    code behind file (which for me is VB.NET) but I don't know what.

    Can anyone out there help me please? I would appreciate any code-
    samples/suggestions/comments that anyone has to offer. Any advice much
    appreciated...

    Thanks,
    Al.
    , Jul 6, 2007
    #1
    1. Advertising

  2. Norman Yuan Guest

    Probably you have already know you can only open a new browser window with
    client side script (Java/JScript). Yes, you only need to attach a piece of
    javascript to open a new window that calling another webform/page. Here is
    an example:

    private void Page_Load(....)
    {
    if (!Page.IsPostBack)
    {
    ...
    Button1.Attributes.Add("onlick","window.open('http://www.thesite.com/thepage.aspx','New
    Window');return false;")
    }

    ...
    }

    if you still want the button click causes post back, you can remove "return
    false;" part.


    <> wrote in message
    news:...
    > Hi everyone,
    >
    >
    > I have an APS.NET (v1.1) type button on a webform page. What I want
    > it to do is when the user clicks it, it then calls another webform
    > page that appears in a pop-up window.
    > Now I know that the button has an "onclick" attribute but that's as
    > far as I get. I guess you need some Javascript and something in the
    > code behind file (which for me is VB.NET) but I don't know what.
    >
    > Can anyone out there help me please? I would appreciate any code-
    > samples/suggestions/comments that anyone has to offer. Any advice much
    > appreciated...
    >
    > Thanks,
    > Al.
    >
    Norman Yuan, Jul 6, 2007
    #2
    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. timmso
    Replies:
    1
    Views:
    460
    Alex Papadimoulis
    Dec 12, 2003
  2. KK
    Replies:
    2
    Views:
    498
    Big Brian
    Oct 14, 2003
  3. =?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:
    430
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Jul 12, 2006
  4. Luqman
    Replies:
    2
    Views:
    644
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    Apr 11, 2007
  5. Paul
    Replies:
    6
    Views:
    3,042
    A6034447
    Nov 26, 2009
Loading...

Share This Page