Page.RegisterStartupScript not working ??

I am sure many has gone through this where Page.RegisterStartupScript is not working. There are a couple of reasons, they are

1. If the page's form has no "runat=server"

2. If there is a update panel. This can be overcome by using ScriptManager.RegisterStartupScript

3. If there is someother javascript on the page.init

Also the Page.RegisterStartupScript is obsolete, start using ClientScript.RegisterStartupScript

Happy Coding....

Comments

Popular posts from this blog

Jesus - God Thinks of you.

ASP.NET 4.0 Feature - URL Routing

Tips on JQuery Intellisense in VS 2008