opening a window in a different browser

Discussion in 'ASP .Net' started by =?Utf-8?B?QWxpIFNoYWh6YWQ=?=, Jul 30, 2007.

  1. Hi,
    asp.net 2.0, ie6, opera 9.22

    For various supportability reasons, we need to redirect a page to a url and
    require that the target url should open in an Opera browser. The call is
    simple

    Response.Redirect(url, true);

    It works fine if its all IE environment. but am wondering how can i specify
    that the new window should open in Opera instead. Any page directives or
    something?

    regards,
    Ali
    =?Utf-8?B?QWxpIFNoYWh6YWQ=?=, Jul 30, 2007
    #1
    1. Advertising

  2. =?Utf-8?B?QWxpIFNoYWh6YWQ=?=

    Patrice Guest

    Basically the idea is to open the web application in a particular browser
    and then the whole application will be shown inside this browser.

    You may want to explain what you are trying to do but if you want to open a
    page in a another browser from a particular browser IMO this is not posisble
    (plus it's likely it will cause problems such as sessions etc...)

    You may want to explain what you are trying to do...

    ---
    Patrice

    "Ali Shahzad" <> a écrit dans le message
    de news: ...
    > Hi,
    > asp.net 2.0, ie6, opera 9.22
    >
    > For various supportability reasons, we need to redirect a page to a url
    > and
    > require that the target url should open in an Opera browser. The call is
    > simple
    >
    > Response.Redirect(url, true);
    >
    > It works fine if its all IE environment. but am wondering how can i
    > specify
    > that the new window should open in Opera instead. Any page directives or
    > something?
    >
    > regards,
    > Ali
    Patrice, Jul 30, 2007
    #2
    1. Advertising

  3. sure. The problem basically started with print and print preview
    functionalities. w3c specifies page-break-after:avoid and
    page-break-inside:avoid. this was very handy for us since we have to generate
    pdfs from our pages and may also want printouts. Unfortunatley ie6 doesnt
    support the 'avoid' spec! Opera on the other hand perfectly supports both. We
    now have the option to either completely switch to Opera or to open just 1
    (our custom preview page) in Opera. The overall app is working just fine with
    IE6. the whole app is built with asp.net and is placed as a take pane in an
    infopath form. So i just prefer that in general it should still use IE, but
    when we need to preview the page, then it pops up in an Opera window, and
    hence allowing us to get a nice print preview

    Ali

    "Patrice" wrote:

    > Basically the idea is to open the web application in a particular browser
    > and then the whole application will be shown inside this browser.
    >
    > You may want to explain what you are trying to do but if you want to open a
    > page in a another browser from a particular browser IMO this is not posisble
    > (plus it's likely it will cause problems such as sessions etc...)
    >
    > You may want to explain what you are trying to do...
    >
    > ---
    > Patrice
    >
    > "Ali Shahzad" <> a écrit dans le message
    > de news: ...
    > > Hi,
    > > asp.net 2.0, ie6, opera 9.22
    > >
    > > For various supportability reasons, we need to redirect a page to a url
    > > and
    > > require that the target url should open in an Opera browser. The call is
    > > simple
    > >
    > > Response.Redirect(url, true);
    > >
    > > It works fine if its all IE environment. but am wondering how can i
    > > specify
    > > that the new window should open in Opera instead. Any page directives or
    > > something?
    > >
    > > regards,
    > > Ali

    >
    >
    >
    =?Utf-8?B?QWxpIFNoYWh6YWQ=?=, Jul 30, 2007
    #3
  4. =?Utf-8?B?QWxpIFNoYWh6YWQ=?=

    Aidy Guest

    You have to alter the link that goes to the page you are redirecting from
    such that the page is opened in a new window.

    <a href="MyRedirectingPage.aspx" target="_blank">

    "Ali Shahzad" <> wrote in message
    news:...
    > Hi,
    > asp.net 2.0, ie6, opera 9.22
    >
    > For various supportability reasons, we need to redirect a page to a url
    > and
    > require that the target url should open in an Opera browser. The call is
    > simple
    >
    > Response.Redirect(url, true);
    >
    > It works fine if its all IE environment. but am wondering how can i
    > specify
    > that the new window should open in Opera instead. Any page directives or
    > something?
    >
    > regards,
    > Ali
    >
    Aidy, Jul 30, 2007
    #4
  5. "Aidy" <> wrote in message
    news:...

    > You have to alter the link that goes to the page you are redirecting from
    > such that the page is opened in a new window.
    >
    > <a href="MyRedirectingPage.aspx" target="_blank">


    That won't help in this case...


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
    Mark Rae [MVP], Jul 30, 2007
    #5
  6. yup. I believe that will open a new window but in IE and not in Opera! Any
    suggestions to how i can open the window in Opera?

    "Mark Rae [MVP]" wrote:

    > "Aidy" <> wrote in message
    > news:...
    >
    > > You have to alter the link that goes to the page you are redirecting from
    > > such that the page is opened in a new window.
    > >
    > > <a href="MyRedirectingPage.aspx" target="_blank">

    >
    > That won't help in this case...
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
    >
    >
    =?Utf-8?B?QWxpIFNoYWh6YWQ=?=, Jul 30, 2007
    #6
  7. * Ali Shahzad wrote, On 30-7-2007 15:36:
    > yup. I believe that will open a new window but in IE and not in Opera! Any
    > suggestions to how i can open the window in Opera?


    Firefox registers a special protocol handler called firefox://. Firefox
    supports your page-break:avoid rule. You could create a link which
    begins with that. But I'd strongly advise against it, with all the
    security issues that are being caused by this protocol.

    I'm not sure if Opera supports a similar protocol handler. A quick
    Google search for opera:// didn't help.

    Jesse

    >> "Aidy" <> wrote in message
    >> news:...
    >>
    >>> You have to alter the link that goes to the page you are redirecting from
    >>> such that the page is opened in a new window.
    >>>
    >>> <a href="MyRedirectingPage.aspx" target="_blank">

    >> That won't help in this case...
    >>
    >>
    >> --
    >> Mark Rae
    >> ASP.NET MVP
    >> http://www.markrae.net
    >>
    >>
    Jesse Houwing, Jul 30, 2007
    #7
  8. "Ali Shahzad" <> wrote in message
    news:...

    > yup. I believe that will open a new window but in IE and not in Opera!


    Correct.

    > Any suggestions to how i can open the window in Opera?


    Not without some sort of client-side ActiveX control - I'd forget it if I
    were you...


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
    Mark Rae [MVP], Jul 30, 2007
    #8
  9. =?Utf-8?B?QWxpIFNoYWh6YWQ=?=

    Patrice Guest

    Humm...

    My personal preference would be likely to avoid such a workaround. If the
    app is cross browsers I would use Opera at least when printing is needed.
    You could also see if this is solved in IE7 or if IE6 offers something
    similar but different (and posisbkly detect IE and ask to use Opera for
    printing as a workaround).

    You could also consider create directly PDF files (likely a bit late at this
    step as you already chosen the HTML route).

    Note also that if the page opens in another browser the session is not
    maintained. This could perhaps also cause for the workaround you are
    trying...

    --
    Patrice

    "Ali Shahzad" <> a écrit dans le message
    de news: ...
    > sure. The problem basically started with print and print preview
    > functionalities. w3c specifies page-break-after:avoid and
    > page-break-inside:avoid. this was very handy for us since we have to
    > generate
    > pdfs from our pages and may also want printouts. Unfortunatley ie6 doesnt
    > support the 'avoid' spec! Opera on the other hand perfectly supports both.
    > We
    > now have the option to either completely switch to Opera or to open just 1
    > (our custom preview page) in Opera. The overall app is working just fine
    > with
    > IE6. the whole app is built with asp.net and is placed as a take pane in
    > an
    > infopath form. So i just prefer that in general it should still use IE,
    > but
    > when we need to preview the page, then it pops up in an Opera window, and
    > hence allowing us to get a nice print preview
    >
    > Ali
    >
    > "Patrice" wrote:
    >
    >> Basically the idea is to open the web application in a particular browser
    >> and then the whole application will be shown inside this browser.
    >>
    >> You may want to explain what you are trying to do but if you want to open
    >> a
    >> page in a another browser from a particular browser IMO this is not
    >> posisble
    >> (plus it's likely it will cause problems such as sessions etc...)
    >>
    >> You may want to explain what you are trying to do...
    >>
    >> ---
    >> Patrice
    >>
    >> "Ali Shahzad" <> a écrit dans le
    >> message
    >> de news: ...
    >> > Hi,
    >> > asp.net 2.0, ie6, opera 9.22
    >> >
    >> > For various supportability reasons, we need to redirect a page to a url
    >> > and
    >> > require that the target url should open in an Opera browser. The call
    >> > is
    >> > simple
    >> >
    >> > Response.Redirect(url, true);
    >> >
    >> > It works fine if its all IE environment. but am wondering how can i
    >> > specify
    >> > that the new window should open in Opera instead. Any page directives
    >> > or
    >> > something?
    >> >
    >> > regards,
    >> > Ali

    >>
    >>
    >>
    Patrice, Jul 30, 2007
    #9
  10. =?Utf-8?B?QWxpIFNoYWh6YWQ=?=

    chenhong Guest

    I dont know exactly how to do what you ask.
    But I have an idea.
    You use javascript to run an external program.
    Just hope the antivirus software wont think it's
    a virus.

    "Ali Shahzad" <> дÈëÏûÏ¢ÐÂÎÅ:...
    > Hi,
    > asp.net 2.0, ie6, opera 9.22
    >
    > For various supportability reasons, we need to redirect a page to a url
    > and
    > require that the target url should open in an Opera browser. The call is
    > simple
    >
    > Response.Redirect(url, true);
    >
    > It works fine if its all IE environment. but am wondering how can i
    > specify
    > that the new window should open in Opera instead. Any page directives or
    > something?
    >
    > regards,
    > Ali
    chenhong, Jul 30, 2007
    #10
  11. "chenhong" <> wrote in message
    news:...

    > You use javascript to run an external program.


    That would require a fairly hefty lowering of security, and would be no use
    at all on the public Internet...


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
    Mark Rae [MVP], Jul 30, 2007
    #11
  12. hi,
    but this can be a viable option, since we are running the application on
    intranet. What do you guys recommend:
    1) using clients side scripting (javascript) to open a new opera window, or
    2) server side API? since we are already doing response.redirect in
    code-behind.

    am actually not too sure how 2) will work, since calling an external app on
    server side might just do nothin on the client side! or?
    In either case, please send me some code snippets if you have/ small enough
    to write.

    and thanks a lot for your responses
    Ali

    "Mark Rae [MVP]" wrote:

    > "chenhong" <> wrote in message
    > news:...
    >
    > > You use javascript to run an external program.

    >
    > That would require a fairly hefty lowering of security, and would be no use
    > at all on the public Internet...
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
    >
    >
    =?Utf-8?B?QWxpIFNoYWh6YWQ=?=, Jul 30, 2007
    #12
  13. "Ali Shahzad" <> wrote in message
    news:...

    > but this can be a viable option, since we are running the application on
    > intranet.


    Personally, I wouldn't even consider it because of all the additional work
    it will entail...

    > What do you guys recommend:


    Don't even try to do it...

    > am actually not too sure how 2) will work


    It won't...


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
    Mark Rae [MVP], Jul 30, 2007
    #13
    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. UJ
    Replies:
    2
    Views:
    7,488
    John Timney \(ASP.NET MVP\)
    Jun 27, 2005
  2. Replies:
    1
    Views:
    435
  3. Uriah Piddle

    Opening new browser window without toolbars

    Uriah Piddle, Nov 10, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    647
    Uriah Piddle
    Nov 10, 2006
  4. john Devlon

    opening new browser window

    john Devlon, Jan 6, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    356
    Malik Asif Joyia
    Jan 7, 2008
  5. Danny
    Replies:
    1
    Views:
    115
    Robert
    Sep 15, 2004
Loading...

Share This Page