469,578 Members | 1,869 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,578 developers. It's quick & easy.

image button click opens a new windows .. how?

Hi,

I have an image button on my page, and I want to have a popup window open up
when the user clicks the imagebutton, and if possible set the window
configuration(ie no tool bar, etc) like javascript can.

On the click event I have page.response.redirect ("page.aspx") but this
simply opens the page in the same window.

Thanks
Aug 19 '06 #1
1 1978
Hi Aussie Rules,

I think you need to add ImageButton Attributes collection onclick like
this:

protected override void OnInit(EventArgs e)
{
base.OnInit(e);
Button1.Attributes.Add("onlick", "ShowPopUp()");
}

Now you can add ShowPopUp() javascript function right inside .aspx
file:

<script type="text/javascript">
function ShowPopUp() {
window.open(......);
}
</script>

Regards,
Alex.

Aussie Rules написав:
Hi,

I have an image button on my page, and I want to have a popup window openup
when the user clicks the imagebutton, and if possible set the window
configuration(ie no tool bar, etc) like javascript can.

On the click event I have page.response.redirect ("page.aspx") but this
simply opens the page in the same window.

Thanks
Aug 20 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.