This question is locked. New answers and comments are not allowed.
I am attempting to build a sample application, by converting parts of the Telerik Demo Website to Razor syntax. The issue is that the content appears out of order at the top.
By the way, I have had this issue even when using a single component such as Grid on ASP.Net MVC3.
I am attaching a screenshot and zip file of my entire project. Simply start the project to see the issue. Thanks.
Here is the HTML output of my index view on home controller:
As you can see the code is being generated out of the order it is defined in the _Layout.cshtml:
By the way, I have had this issue even when using a single component such as Grid on ASP.Net MVC3.
I am attaching a screenshot and zip file of my entire project. Simply start the project to see the issue. Thanks.
Here is the HTML output of my index view on home controller:
<
link
type
=
"text/css"
href
=
"/Content/telerik.examples.min.css"
rel
=
"stylesheet"
/><
BR
><
link
type
=
"text/css"
href
=
"/Content/telerik.common.css"
rel
=
"stylesheet"
/><
BR
><
link
type
=
"text/css"
href
=
"/Content/telerik.vista.css"
rel
=
"stylesheet"
/><
BR
><
link
type
=
"text/css"
href
=
"/Content/telerik.rtl.css"
rel
=
"stylesheet"
/><
BR
><
ul
class="t-widget
t-panelbar t-reset demos-navigation"
id
=
"navigation-controls"
><
li
class
=
"t-item t-state-default"
><
a
class
=
"t-link t-header"
href
=
"/home/firstlook"
><
span
class="t-sprite
tOverview"></
span
>Overview</
a
></
li
><
li
class="t-item
t-state-default"><
a
class
=
"t-link t-header"
href
=
"/calendar/firstlook"
><
span
class="t-sprite
tCalendar"></
span
>Calendar</
a
></
li
><
li
class="t-item
t-state-default"><
a
class
=
"t-link t-header"
href
=
"/combobox/firstlook"
><
span
class="t-sprite
tComboBox"></
span
>ComboBox</
a
></
li
><
li
class="t-item
t-state-default"><
a
class
=
"t-link t-header"
href
=
"/datepicker/firstlook"
><
span
class="t-sprite
tDatePicker"></
span
>DatePicker</
a
></
li
><
li
class="t-item
t-state-default"><
a
class
=
"t-link t-header"
href
=
"/editor/firstlook"
><
span
class="t-sprite
tEditor"></
span
>Editor</
a
></
li
><
li
class="t-item
t-state-default"><
a
class
=
"t-link t-header"
href
=
"/grid/firstlook"
><
span
class="t-sprite
tGrid"></
span
>Grid</
a
></
li
><
li
class="t-item
t-state-default"><
a
class
=
"t-link t-header"
href
=
"/menu/firstlook"
><
span
class="t-sprite
tMenu"></
span
>Menu</
a
></
li
><
li
class="t-item
t-state-default"><
a
class
=
"t-link t-header"
href
=
"/numerictextbox/firstlook"
><
span
class="t-sprite
tNumericTextBox"></
span
>NumericTextBox</
a
></
li
><
li
class
=
"t-item t-state-default"
><
a
class
=
"t-link t-header"
href
=
"/panelbar/firstlook"
><
span
class="t-sprite
tPanelBar"></
span
>PanelBar</
a
></
li
><
li
class="t-item
t-state-default"><
a
class
=
"t-link t-header"
href
=
"/tabstrip/firstlook"
><
span
class="t-sprite
tTabStrip"></
span
>TabStrip</
a
></
li
><
li
class="t-item
t-state-default"><
a
class
=
"t-link t-header"
href
=
"/treeview/firstlook"
><
span
class="t-sprite
tTreeView"></
span
>TreeView</
a
></
li
><
li
class="t-item
t-state-default"><
a
class
=
"t-link t-header"
href
=
"/window/firstlook"
><
span
class="t-sprite
tWindow"></
span
>Window</
a
></
li
></
ul
><
ul
class
=
"t-widget t-reset t-header t-menu"
id
=
"product-lines"
><
li
class
=
"t-item t-state-default"
id
=
"productAjaxSuite"
><
a
class
=
"t-link"
href="<A
aspnet-ajax?? demos.telerik.com
http:>RadControls'>http://demos.telerik.com/aspnet-ajax">RadControls</
A
>
for ASP.NET AJAX</
a
></
li
><
li
class
=
"t-item t-state-default"
id
=
"productSlSuite"
><
a
class
=
"t-link"
href="<A
demos.telerik.com http:
silverlight??>RadControls'>http://demos.telerik.com/silverlight">RadControls</
A
>
for Silverlight</
a
></
li
><
li
class
=
"t-item t-state-default"
id
=
"productWpfSuite"
><
a
class
=
"t-link"
href="<A
demos.telerik.com http:
wpf??>RadControls'>http://demos.telerik.com/wpf">RadControls</
A
> for
WPF</
a
></
li
><
li
class
=
"t-item t-state-default"
id
=
"productORM"
><
a
class
=
"t-link"
href="<A
demos.telerik.com http:
orm??>Telerik'>http://demos.telerik.com/orm">Telerik</
A
> OpenAccess
ORM</
a
></
li
><
li
class
=
"t-item t-state-default"
id
=
"productReporting"
><
a
class
=
"t-link"
href="<A
demos.telerik.com http:
reporting??>Telerik'>http://demos.telerik.com/reporting">Telerik</
A
>
Reporting</
a
></
li
><
li
class
=
"t-item t-state-default"
id
=
"all-products"
><
a
class
=
"t-link"
href
=
"#product-lines-6"
>ALL
PRODUCTS<
span
class
=
"t-icon t-arrow-down"
></
span
></
a
><
ul
class
=
"t-group"
><
li
class
=
"t-item"
><
div
class
=
"t-content"
id
=
"product-lines-6"
>
<
BR
><
div
class
=
'column'
><
BR
> <
strong
>UI
Components</
strong
><
BR
>
<
ul
><
BR
> <
li
><
a
href
=
'http://www.telerik.com/products/aspnet-ajax.aspx'
><
span
class
=
'ajax'
></
span
>ASP.NET
AJAX</
a
></
li
><
BR
>
<
li
><
a
href
=
'http://www.telerik.com/products/aspnet-mvc.aspx'
><
span
class
=
'mvc'
></
span
>ASP.NET
MVC</
a
></
li
><
BR
>
<
li
><
a
href
=
'http://www.telerik.com/products/silverlight.aspx'
><
span
class
=
'silverlight'
></
span
>Silverlight</
a
></
li
><
BR
>
<
li
><
a
href
=
'http://www.telerik.com/products/winforms.aspx'
><
span
class
=
'winforms'
></
span
>WinForms</
a
></
li
><
BR
>
<
li
><
a
href
=
'http://www.telerik.com/products/wpf.aspx'
><
span
class
=
'wpf'
></
span
>WPF</
a
></
li
><
BR
>
<
li
><
a
href
=
'http://www.telerik.com/products/windows-phone.aspx'
><
span
class
=
'winphone'
></
span
>Windows
Phone</
a
></
li
><
BR
>
</
ul
><
BR
> <
strong
class='not-first-of-type
linked'><
a
href
=
'http://www.telerik.com/automated-testing-tools.aspx'
>Automated Testing
Tools</
a
></
strong
><
BR
>
<
ul
><
BR
> <
li
><
a
class
=
'webuites'
></
span
>WebUI Test
Studio</
a
></
li
><
BR
>
</
ul
><
BR
></
div
><
BR
><
div
class
=
'column'
><
BR
>
<
strong
>Data</
strong
><
BR
>
<
ul
><
BR
> <
li
><
a
href
=
'http://www.telerik.com/products/orm.aspx'
><
span
class
=
'orm'
></
span
>OpenAccess
ORM</
a
></
li
><
BR
>
<
li
><
a
href
=
'http://www.telerik.com/products/reporting.aspx'
><
span
class
=
'reporting'
></
span
>Reporting</
a
></
li
><
BR
>
</
ul
><
BR
> <
strong
class
=
'not-first-of-type'
>Developer
Productivity</
strong
><
BR
>
<
ul
><
BR
> <
li
><
a
href
=
'http://www.telerik.com/products/justcode.aspx'
><
span
class
=
'jc'
></
span
>JustCode</
a
></
li
><
BR
>
<
li
><
a
href
=
'http://www.telerik.com/products/mocking.aspx'
><
span
class
=
'jm'
></
span
>JustMock</
a
></
li
><
BR
>
</
ul
><
BR
></
div
><
BR
><
div
class='last
column'><
BR
> <
strong
class
=
'linked'
><
a
href
=
'http://www.telerik.com/team-productivity-tools.aspx'
>Team Productivity
Tools</
a
></
strong
><
BR
>
<
ul
><
BR
> <
li
><
a
class
=
'tfs'
></
span
>TeamPulse</
a
></
li
><
BR
>
<
li
><
a
class
=
'tfs'
></
span
>Work Item
Manager</
a
></
li
><
BR
>
<
li
><
a
class
=
'tfs'
></
span
>Project
Dashboard</
a
></
li
><
BR
>
</
ul
><
BR
> <
strong
class='not-first-of-type
linked'><
a
href
=
'http://www.sitefinity.com/'
>Content
Management</
a
></
strong
><
BR
>
<
ul
><
BR
> <
li
><
a
href
=
'http://www.sitefinity.com/asp-net-cms-features.aspx'
><
span
class
=
'sitefinity'
></
span
>Sitefinity .NET
CMS</
a
></
li
><
BR
>
</
ul
><
BR
></
div
><
BR
></
div
></
li
></
ul
></
li
></
ul
><
script
type
=
"text/javascript"
src
=
"/Scripts/jquery-1.4.3.min.js"
></
script
><
BR
><
script
type
=
"text/javascript"
src
=
"/Scripts/telerik.examples.js"
></
script
><
BR
><
script
type
=
"text/javascript"
src
=
"/Scripts/telerik.common.min.js"
></
script
><
BR
><
script
type
=
"text/javascript"
src
=
"/Scripts/telerik.panelbar.min.js"
></
script
><
BR
><
script
type
=
"text/javascript"
src
=
"/Scripts/telerik.menu.min.js"
></
script
><
BR
><
script
type
=
"text/javascript"
><
BR
>//
<![CDATA[<BR>jQuery(document).ready(function(){<BR>jQuery('#navigation-controls').tPanelBar({expandMode:1});<BR>jQuery('#product-lines').tMenu({onLoad:productMenuLoad});});<BR>//]]>
<
BR
></
script
><!DOCTYPE
html><
BR
><
html
><
BR
><
head
><
BR
> <
title
>Home
Page</
title
><
BR
> <
script
src
=
"/Scripts/jquery.unobtrusive-ajax.min.js"
type
=
"text/javascript"
></
script
><
BR
> <
script
src
=
"/Scripts/jquery.validate.min.js"
type
=
"text/javascript"
></
script
><
BR
> <
script
src
=
"/Scripts/jquery.validate.unobtrusive.min.js"
type
=
"text/javascript"
></
script
><
BR
></
head
><
BR
><
body
><
BR
>
<
div
id
=
"page"
><
BR
> <
h1
id
=
"title"
>
As you can see the code is being generated out of the order it is defined in the _Layout.cshtml:
<!DOCTYPE html>
<
html
>
<
head
>
<
title
>@View.Title</
title
>
<
script
src
=
"@Url.Content("
~/Scripts/jquery.unobtrusive-ajax.min.js")"
type
=
"text/javascript"
></
script
>
<
script
src
=
"@Url.Content("
~/Scripts/jquery.validate.min.js")"
type
=
"text/javascript"
></
script
>
<
script
src
=
"@Url.Content("
~/Scripts/jquery.validate.unobtrusive.min.js")"
type
=
"text/javascript"
></
script
>
@{ Html.Telerik().StyleSheetRegistrar()
.DefaultGroup(group => group
.Add("telerik.examples.css")
.Add("telerik.common.css")
.Add("telerik." + Html.GetCurrentTheme() + ".css")
.Add("telerik.rtl.css")
.Combined(false)
.Compress(false)).Render();
}
@{Html.Partial("Header"); }
</
head
>
<
body
>
<
div
id
=
"page"
>
<
h1
id
=
"title"
>
@{ Html.ActionLink("Telerik Extensions for ASP.NET MVC", "FirstLook", "Home");}
</
h1
>
<
div
id
=
"main"
>
@RenderBody();
</
div
>
@{ Html.Partial("Navigation");}
@{ Html.Partial("Resources");}
@{ Html.Partial("ProductLines");}
@{ Html.Partial("Footer");}
</
div
>
@{ Html.Telerik().ScriptRegistrar()
.DefaultGroup(group => group
.Add("telerik.examples.js")
.Compress(false))
.Render();}
</
body
>
</
html
>