Groups > Asp .Net > ASP.NET Tips and tricks > Re: Open a popup window after a button click




Re: Open a popup window after a button click

Re: Open a popup window after a button click
Fri, 29 Feb 2008 23:19:57 +000
I came across your old message of adding an Attribute to a button.  And I was
wondering, is it possible to do it right in the page side (not in the
script/code behind)?

What I tried is the following but it does not seem to work:

<asp:Button id="MyButton" runat=server Text="Help"
onClientClick="window.open('www.help.htm'); return false;)" />

Do you see anything wrong with the above code?

 Thank you.
Post Reply
Re: Open a popup window after a button click
Mon, 3 Mar 2008 12:02:12 +0000
Hi Dimacorp ,

please try this:

 function Navigate()

{javascript:window.open("http://www.yahoo.com");

} 

</script><asp:Buttonid="MyButton"runat="server"Text
="Help"onClientClick="Navigate()"/>
Post Reply
about | contact