Re: Opening a pop-up window from code behind page

Discussion in 'ASP .Net' started by Steve C. Orr [MVP, MCSD], Aug 12, 2004.

  1. Try this code:
    RegisterStartupScript("startupScript", "<script
    language=JavaScript>window.open('test.aspx?Parm1=A,'_blank');</script>")

    Here's more info:
    http://msdn.microsoft.com/library/d...mWebUIPageClassRegisterStartupScriptTopic.asp

    WinXP SP2 does include a popup blocker for IE, but it works like most other
    popup blockers & notifies the user if a popup has been blocked and popup
    blocking can be turned off by the user for certain pages or web sites. So
    popup windows are still possible even though they might present a minor
    usability issue with novice users.

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


    "Vi" <> wrote in message
    news:...
    > Hi,
    > I have a WebControls.Button control on a page. When this control is
    > clicked,
    > I want to perform a server side action (run a DB stored proc) and if it's
    > successful open a pop-up window passing some values to it. If the server
    > side
    > action is not successful - I want to display an error message.
    > How can I run server side (run stored proc) and client side code
    > (window.open) from the code behind page?
    >
    > Thank you in advance.
    >
    Steve C. Orr [MVP, MCSD], Aug 12, 2004
    #1
    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. Ben Miller [msft]

    Re: Code Behind vs. no code behind: error

    Ben Miller [msft], Jun 27, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    554
    Alphonse Giambrone
    Jun 28, 2003
  2. bruce barker
    Replies:
    1
    Views:
    2,773
    =?Utf-8?B?Vmk=?=
    Aug 12, 2004
  3. David Thielen

    pop-up browser persist data back to parent page code-behind

    David Thielen, Mar 23, 2006, in forum: ASP .Net Web Controls
    Replies:
    7
    Views:
    168
    Steven Cheng[MSFT]
    Mar 29, 2006
  4. Madame Blablavatsky
    Replies:
    8
    Views:
    148
    Dr John Stockton
    Sep 16, 2005
  5. Howard Martin

    Opening a pop-up from a pop-up

    Howard Martin, Jul 11, 2007, in forum: Javascript
    Replies:
    2
    Views:
    72
    Howard Martin
    Jul 12, 2007
Loading...

Share This Page