I am trying to upgrade asp.net C # web project from framework 2.0 to 3.5.
When I do this, the client side of the script that is written using RegisterStartupScript does not appear on the client page.
This works fine when I compile for 2.0 and 3.0, but not when I compile for 3.5.
Here is the code that fails:
Page myPage = (Page)HttpContext.Current.Handler;
ScriptManager.RegisterStartupScript(myPage, myPage.GetType(), "alertscript", "alert('test');", true);
This is called from a class project, not the web project itself, so I use HttpContext.Current.Handler.
There are no errors from the compiler, the CLR, and there are no JavaScript errors on the client side.
If I do an alertcript search on my displayed page, the above code does not actually exist.
Anyone have any ideas on what is going on?
-Edit -
, , script .
- ( ), . , , .
ScriptManager.RegisterStartupScript, - -?
-Edit2 -
, :
, , : myPage.ClientScript._registeredClientStartupScripts -, , , . , , .
, , , , -, .
, 2.0 3.0, 3.5.