This is a migrated thread and some comments may be shown as answers.

javascript not working from codebehind when use radscriptmanger

4 Answers 137 Views
ScriptManager and StyleSheetManager
This is a migrated thread and some comments may be shown as answers.
Mehul Dumasia
Top achievements
Rank 1
Mehul Dumasia asked on 26 Mar 2010, 12:01 PM
i used this code for close Rad window

  string script1 = "<SCRIPT LANGUAGE='JavaScript'> ";
                script1 += "OK_Clicked()";
                script1 += "</SCRIPT>";
                Page.RegisterClientScriptBlock("ClientScript", script1);

but its not work
i also tried with
  string script2 = "<SCRIPT LANGUAGE='JavaScript'> ";
                script2 += "OK_Clicked()";                
                script2 += "</SCRIPT>";
                //RadScriptManager1.EnableScriptCombine = true;
                //Page.RegisterClientScriptBlock("ClientScript", script2);
                RegisterStartupScript("Startup", script2);


4 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 26 Mar 2010, 02:56 PM
Hi Mehul,

Please use the ScriptManager.RegisterStartupScript instead. Works with RadScriptManager as well.

Greetings,
Tsvetomir Tsonev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Jeremy
Top achievements
Rank 1
answered on 09 Jun 2010, 04:35 AM
Hi

I don't have that option available?
0
Dimitar Milushev
Telerik team
answered on 10 Jun 2010, 09:52 AM
Hello Jeremy,

This is a static method of the ScriptManager class, you don't need a reference to the ScriptManager instance - simply type ScriptManager.RegisterStartupScript();

All the best,
Dimitar Milushev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Jeremy
Top achievements
Rank 1
answered on 08 Jul 2010, 09:23 AM
That works Thanks!
Tags
ScriptManager and StyleSheetManager
Asked by
Mehul Dumasia
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Jeremy
Top achievements
Rank 1
Dimitar Milushev
Telerik team
Share this question
or