opening new browser window

opening new browser window

am 06.01.2008 17:34:57 von John Devlon

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

Re: opening new browser window

am 06.01.2008 17:56:32 von mark

"john Devlon" wrote in message
news:Rq7gj.15197$dW7.2494710@phobos.telenet-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/library/system.web.ui.webco ntrols.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.webco ntrols.hyperlink_properties(VS.80).aspx
where you can specify the ImageUrl, NavigateUrl and Target properties...


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Re: opening new browser window

am 07.01.2008 08:27:01 von Malik Asif Joyia

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$dW7.2494710@phobos.telenet-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
>
>