Opening new asp page using response.redirect

Discussion in 'ASP General' started by anuragsji, Jun 13, 2006.

  1. anuragsji

    anuragsji Guest

    Hi,

    I have one combo box and GO button on the click of GO button page
    submitted and according to selection of one of the option from combo I
    want to redirect my page to some new asp page but at the same time in
    new window of browser.
    I could have achieved this using window.open() of javascript but then
    it will serve as pop up and clients requirement is that not to show as
    popup window due to many users blocked popups.

    Any suggestions, How can I achieve this using response.redirect or any
    coding which is not serve as popup window.

    The work is in ASP 3.0 not in ASP.NET

    Thanks in Advance,
    Anurag
     
    anuragsji, Jun 13, 2006
    #1
    1. Advertising

  2. well, the only solution I can think of is to use an target="_blank" on a <a
    href..

    I believe if you put it on a <form target="_blank" any submitting buttons
    will open in a new browser...

    Karl

    --
    http://www.openmymind.net/



    "anuragsji" <> wrote in message
    news:...
    > Hi,
    >
    > I have one combo box and GO button on the click of GO button page
    > submitted and according to selection of one of the option from combo I
    > want to redirect my page to some new asp page but at the same time in
    > new window of browser.
    > I could have achieved this using window.open() of javascript but then
    > it will serve as pop up and clients requirement is that not to show as
    > popup window due to many users blocked popups.
    >
    > Any suggestions, How can I achieve this using response.redirect or any
    > coding which is not serve as popup window.
    >
    > The work is in ASP 3.0 not in ASP.NET
    >
    > Thanks in Advance,
    > Anurag
    >
     
    Karl Seguin [MVP], Jun 13, 2006
    #2
    1. Advertising

  3. anuragsji

    Hans Kesting Guest

    > Hi,
    >
    > I have one combo box and GO button on the click of GO button page
    > submitted and according to selection of one of the option from combo I
    > want to redirect my page to some new asp page but at the same time in
    > new window of browser.
    > I could have achieved this using window.open() of javascript but then
    > it will serve as pop up and clients requirement is that not to show as
    > popup window due to many users blocked popups.
    >
    > Any suggestions, How can I achieve this using response.redirect or any
    > coding which is not serve as popup window.
    >
    > The work is in ASP 3.0 not in ASP.NET
    >
    > Thanks in Advance,
    > Anurag


    You can't do this with Response.Redirect (not in asp 3.0 and not in
    asp.net 1.1 or 2.0) because the response doesn't understand "windows",
    so it can't open a new one.

    The popup-blockers usually block window.open statements that are fired
    automatically (as in an "onload" function).
    Window.open statements that are fired as a direct result of a
    user-action (onclick) are usually permitted! So you will want to open
    the new window first and then see what should be displayed there.

    Hans Kesting
     
    Hans Kesting, Jun 13, 2006
    #3
  4. <asp:HyperLink ID="myLink" Target="_blank" NavigateUrl="http:../blah.aspx"
    />

    "anuragsji" <> wrote in message
    news:...
    > Hi,
    >
    > I have one combo box and GO button on the click of GO button page
    > submitted and according to selection of one of the option from combo I
    > want to redirect my page to some new asp page but at the same time in
    > new window of browser.
    > I could have achieved this using window.open() of javascript but then
    > it will serve as pop up and clients requirement is that not to show as
    > popup window due to many users blocked popups.
    >
    > Any suggestions, How can I achieve this using response.redirect or any
    > coding which is not serve as popup window.
    >
    > The work is in ASP 3.0 not in ASP.NET
    >
    > Thanks in Advance,
    > Anurag
    >
     
    Stuart Irving, Jun 13, 2006
    #4
  5. oops!
    Forgot
    runat="server"

    "anuragsji" <> wrote in message
    news:...
    > Hi,
    >
    > I have one combo box and GO button on the click of GO button page
    > submitted and according to selection of one of the option from combo I
    > want to redirect my page to some new asp page but at the same time in
    > new window of browser.
    > I could have achieved this using window.open() of javascript but then
    > it will serve as pop up and clients requirement is that not to show as
    > popup window due to many users blocked popups.
    >
    > Any suggestions, How can I achieve this using response.redirect or any
    > coding which is not serve as popup window.
    >
    > The work is in ASP 3.0 not in ASP.NET
    >
    > Thanks in Advance,
    > Anurag
    >
     
    Stuart Irving, Jun 13, 2006
    #5
  6. anuragsji

    Mike Brind Guest

    anuragsji wrote:
    > Hi,



    <snip>

    > The work is in ASP 3.0 not in ASP.NET



    Rather begs the question why you cross-posted it to a dotnet group,
    then, doesn't it?

    --
    Mike Brind
     
    Mike Brind, Jun 13, 2006
    #6
  7. anuragsji

    anuragsji Guest

    Hi,
    As I remember ; This would not work in ASP but works in ASP.NET
    <asp:HyperLink ID="myLink" Target="_blank"
    NavigateUrl="http:../blah.aspx"
    />



    Stuart Irving wrote:
    > oops!
    > Forgot
    > runat="server"
    >
    > "anuragsji" <> wrote in message
    > news:...
    > > Hi,
    > >
    > > I have one combo box and GO button on the click of GO button page
    > > submitted and according to selection of one of the option from combo I
    > > want to redirect my page to some new asp page but at the same time in
    > > new window of browser.
    > > I could have achieved this using window.open() of javascript but then
    > > it will serve as pop up and clients requirement is that not to show as
    > > popup window due to many users blocked popups.
    > >
    > > Any suggestions, How can I achieve this using response.redirect or any
    > > coding which is not serve as popup window.
    > >
    > > The work is in ASP 3.0 not in ASP.NET
    > >
    > > Thanks in Advance,
    > > Anurag
    > >
     
    anuragsji, Jun 14, 2006
    #7
  8. anuragsji

    anuragsji Guest

    I thought that may be .NET group know anything about the same thats why
    I posted on that.
    I also used target="_blank" in <Form...> tag but doing so it have an
    effect on all options on the combo box not only for 1 option. I need
    only for single option which if selected then redirect to new window.

    Thanks to all,
    Anurag


    anuragsji wrote:
    > Hi,
    > As I remember ; This would not work in ASP but works in ASP.NET
    > <asp:HyperLink ID="myLink" Target="_blank"
    > NavigateUrl="http:../blah.aspx"
    > />
    >
    >
    >
    > Stuart Irving wrote:
    > > oops!
    > > Forgot
    > > runat="server"
    > >
    > > "anuragsji" <> wrote in message
    > > news:...
    > > > Hi,
    > > >
    > > > I have one combo box and GO button on the click of GO button page
    > > > submitted and according to selection of one of the option from combo I
    > > > want to redirect my page to some new asp page but at the same time in
    > > > new window of browser.
    > > > I could have achieved this using window.open() of javascript but then
    > > > it will serve as pop up and clients requirement is that not to show as
    > > > popup window due to many users blocked popups.
    > > >
    > > > Any suggestions, How can I achieve this using response.redirect or any
    > > > coding which is not serve as popup window.
    > > >
    > > > The work is in ASP 3.0 not in ASP.NET
    > > >
    > > > Thanks in Advance,
    > > > Anurag
    > > >
     
    anuragsji, Jun 14, 2006
    #8
  9. Hello Anurag,

    How about change the form target dynamically, for example, add a button on
    the form and use following code in its click event:


    if ( document.body.all("DropDownBox").selectedIndex==2)
    {
    MyForm.target ="_blank";
    }

    MyForm.submit();


    Regards,

    Luke Zhang
    Microsoft Online Community Support

    ==================================================
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.
    ==================================================

    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    Luke Zhang [MSFT], Jun 14, 2006
    #9
  10. anuragsji

    anuragsji Guest

    Many Thanks to Luke Zhang and to all who helped me on the same.I used
    document.body.all("DropDownBox").SelectedIndex==2.................and
    my work is done
    Thanks a lot
    Anurag


    Luke Zhang [MSFT] wrote:
    > Hello Anurag,
    >
    > How about change the form target dynamically, for example, add a button on
    > the form and use following code in its click event:
    >
    >
    > if ( document.body.all("DropDownBox").selectedIndex==2)
    > {
    > MyForm.target ="_blank";
    > }
    >
    > MyForm.submit();
    >
    >
    > Regards,
    >
    > Luke Zhang
    > Microsoft Online Community Support
    >
    > ==================================================
    > When responding to posts, please "Reply to Group" via your newsreader so
    > that others may learn and benefit from your issue.
    > ==================================================
    >
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
     
    anuragsji, Jun 15, 2006
    #10
    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?VHJveQ==?=

    Response.redirect does not redirect from .aspx page

    =?Utf-8?B?VHJveQ==?=, Oct 18, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    5,261
    Srowe1975
    Oct 15, 2008
  2. anuragsji
    Replies:
    7
    Views:
    13,869
    Luke Zhang [MSFT]
    Jun 14, 2006
  3. André
    Replies:
    3
    Views:
    1,906
    André
    Dec 1, 2006
  4. Doogie
    Replies:
    3
    Views:
    843
    Doogie
    Jun 22, 2007
  5. Sal
    Replies:
    1
    Views:
    551
Loading...

Share This Page