opening new browser window

Discussion in 'ASP .Net' started by john Devlon, Jan 6, 2008.

  1. john Devlon

    john Devlon Guest

    Hi

    Can anyone please help me?

    When I click on a imagebutton, I would to open a new browser window, display
    the same image, enlarged.

    Does anyone know how to do that in asp.net ?

    thanx

    John
     
    john Devlon, Jan 6, 2008
    #1
    1. Advertising

  2. "john Devlon" <> wrote in message
    news:Rq7gj.15197$-ops.be...

    > When I click on a imagebutton, I would to open a new browser window,
    > display the same image, enlarged.
    >
    > Does anyone know how to do that in asp.net ?


    You'll need to use the OnClientClick property to inject client-side
    JavaScript:
    http://msdn2.microsoft.com/en-us/li...ontrols.imagebutton.onclientclick(VS.80).aspx

    However, you're really using the wrong control for this - use a HyperLink
    instead:
    http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.hyperlink_properties(VS.80).aspx
    where you can specify the ImageUrl, NavigateUrl and Target properties...


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
     
    Mark Rae [MVP], Jan 6, 2008
    #2
    1. Advertising

  3. Hi


    You can simply Add a Attribute of OnClick and add javascript
    window.open("test.html")

    Regards, ASIF
    Sr. Software Engineer
    Palmchip Pakistan Pvt Ltd.

    "john Devlon" <> wrote in message
    news:Rq7gj.15197$-ops.be...
    > Hi
    >
    > Can anyone please help me?
    >
    > When I click on a imagebutton, I would to open a new browser window,
    > display the same image, enlarged.
    >
    > Does anyone know how to do that in asp.net ?
    >
    > thanx
    >
    > John
    >
    >
     
    Malik Asif Joyia, Jan 7, 2008
    #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?Tm92aWNl?=
    Replies:
    2
    Views:
    6,666
    Alan Ferrandiz Langley
    Jun 9, 2004
  2. UJ
    Replies:
    2
    Views:
    7,526
    John Timney \(ASP.NET MVP\)
    Jun 27, 2005
  3. Replies:
    1
    Views:
    448
  4. Uriah Piddle

    Opening new browser window without toolbars

    Uriah Piddle, Nov 10, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    672
    Uriah Piddle
    Nov 10, 2006
  5. Gordon
    Replies:
    3
    Views:
    311
    Steven Burn
    Apr 16, 2004
Loading...

Share This Page