asp button onclick reloads the parent page

sponsorr1971

New Member
I have a button and added onlcik event from the code behind. When I click on the button it reloads the parent page. What could be the problem? Please let me know.\[code\]<asp:Button ID="btnReport" runat="server" Text="Report"/>\[/code\]Code behind:\[code\]string url = "http://www.google.com";Page.ClientScript.RegisterStartupScript(this.GetType(), "OpenWin", "<script language=javascript>function Report() { window.open ('" + url + "', null,'top=1,left=1,center=yes,resizable=no,Width=840px, Height= 300px,status=no,titlebar=no;toolbar=no, menubar=no,location=no,scrollbars=yes');}</script>");btnReport.Attributes.Add("OnClick", "Report()");\[/code\]
 
Top