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

[Solved] ScriptRegistrar is Partial View not rendering

2 Answers 112 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.
Justin Stuparitz
Top achievements
Rank 1
Justin Stuparitz asked on 13 Nov 2009, 08:05 PM
Is it possible to use:

 Html.Telerik().ScriptRegistrar()
       
.OnDocumentReady(() => .........

inside partial views (user controls).  Nothing is rendering when I have this in my partial, but if I add it inside the <asp:Content of the parent view it of course works fine.

thanks





2 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 16 Nov 2009, 09:13 AM
Hello Justin,

The Microsoft Ajax, which is used to render partial view does not evaluate JavaScript code. This is the reason why javascript code could not be rendered when it is placed in partial view. I will suggest you render all required script when main view is rendered.

Kind regards,
Georgi Krustev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Justin Stuparitz
Top achievements
Rank 1
answered on 16 Nov 2009, 04:21 PM
Thanks Georgi.  That would explain it.
Tags
General Discussions
Asked by
Justin Stuparitz
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Justin Stuparitz
Top achievements
Rank 1
Share this question
or