Page.ClientScript.RegisterStartupScript is not working
-
Hi all, I am using C# , asp.net2.0 On a button click I have to generate a report in new window I am using following code but It is neither giving error not redirecting the page to destination. Please help string Script= "<script type='text/javascript' language ='javascript' >"; Script+= "window.open('PasswordRecovery.aspx',null,'resizeable=no,scrollbars=no,addressbar=no,toolbar=no,width=300,Height=250');"; Script+= "</script>"; Type csType = this.GetType(); Page.ClientScript.RegisterStartupScript(csType, "PopupScript", Script); imran khan
-
Hi all, I am using C# , asp.net2.0 On a button click I have to generate a report in new window I am using following code but It is neither giving error not redirecting the page to destination. Please help string Script= "<script type='text/javascript' language ='javascript' >"; Script+= "window.open('PasswordRecovery.aspx',null,'resizeable=no,scrollbars=no,addressbar=no,toolbar=no,width=300,Height=250');"; Script+= "</script>"; Type csType = this.GetType(); Page.ClientScript.RegisterStartupScript(csType, "PopupScript", Script); imran khan
did you used Ajax in this page ? if yes then use ScriptManager.RegisterClientScriptBlock() insted of
imranafsari wrote:
Page.ClientScript.RegisterStartupScript(csType, "PopupScript", Script);
cheers, Abhijit
-
Hi all, I am using C# , asp.net2.0 On a button click I have to generate a report in new window I am using following code but It is neither giving error not redirecting the page to destination. Please help string Script= "<script type='text/javascript' language ='javascript' >"; Script+= "window.open('PasswordRecovery.aspx',null,'resizeable=no,scrollbars=no,addressbar=no,toolbar=no,width=300,Height=250');"; Script+= "</script>"; Type csType = this.GetType(); Page.ClientScript.RegisterStartupScript(csType, "PopupScript", Script); imran khan