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

[Solved] scripregistrar issue with clubbing add scripts and OndocumentReady

0 Answers 17 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Pradeep
Top achievements
Rank 1
Pradeep asked on 12 Mar 2012, 10:44 AM
Hi if i use the below code in my aspx page

<% Html.Telerik().ScriptRegistrar()

 

.Scripts(script => script.AddGroup(

 

"Test", group => group.Add(

"~/Scripts/test.js")))

.OnDocumentReady(() =>
{
%>
var option="test";
var option1=option;

<%

});

%>

 In the above code if i place the breakpoint inside OndocumentReady function and its not at all hitting the breakpoint...

and if i use the below code

<%

= Html.Telerik().ScriptRegistrar().Scripts(scripts =>

scripts.AddGroup(

"Test", group =>

group.Add(

"~/Scripts/test.js")

)

 

)

%>

<% Html.Telerik().ScriptRegistrar()

.OnDocumentReady(() =>
{
%>
var option="test";
var option1=option;

<%

});

%>


in the above code ie if i write seperately the scripts registration and document ready functions the breakpoint is getting hitted...

please let me know why its not hitting the breakpoint when both are clubbed.
Tags
General Discussions
Asked by
Pradeep
Top achievements
Rank 1
Share this question
or