This question is locked. New answers and comments are not allowed.
hi,
i'm using telerik mvc version 2010.3.1318.235
when i open my mvc3 project in internet explorer 8, the page opens in Quirks Mode causing my formatting to appear incorrect.
looking into the source code, this causes my javascript script blocks being rendered right at the beginning of the page source before the DOCTYPE declaration.
i found the following solution http://stackoverflow.com/questions/5407521/mvc-3-razor-view-engine-script-blocks-appear-before-doctype
but when i apply the fix my page gets errors.
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1502: The best overloaded method match for 'System.Web.WebPages.WebPageExecutingBase.Write(System.Web.WebPages.HelperResult)' has some invalid arguments
before:
@{
Html.Telerik().ScriptRegistrar()
.DefaultGroup(group => group.Enabled(false))
.Globalization(true)
.Scripts(scripts => scripts.AddSharedGroup("MyJsGroup{0}".FormatWith(AppHelper.VersionNumber)));
Html.Telerik().ScriptRegistrar()
.Scripts(scripts => scripts.AddSharedGroup("TelerikJsGroup{0}".FormatWith(AppHelper.VersionNumber)))
.Render();
}
after:
@(
Html.Telerik().ScriptRegistrar()
.DefaultGroup(group => group.Enabled(false))
.Globalization(true)
.Scripts(scripts => scripts.AddSharedGroup("MyJsGroup{0}".FormatWith(AppHelper.VersionNumber)))
)
@(Html.Telerik().ScriptRegistrar()
.Scripts(scripts => scripts.AddSharedGroup("TelerikJsGroup{0}".FormatWith(AppHelper.VersionNumber)))
.Render()
)
i'm using telerik mvc version 2010.3.1318.235
when i open my mvc3 project in internet explorer 8, the page opens in Quirks Mode causing my formatting to appear incorrect.
looking into the source code, this causes my javascript script blocks being rendered right at the beginning of the page source before the DOCTYPE declaration.
i found the following solution http://stackoverflow.com/questions/5407521/mvc-3-razor-view-engine-script-blocks-appear-before-doctype
but when i apply the fix my page gets errors.
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1502: The best overloaded method match for 'System.Web.WebPages.WebPageExecutingBase.Write(System.Web.WebPages.HelperResult)' has some invalid arguments
Line 57: @(Html.Telerik().ScriptRegistrar()
Line 58: .Scripts(scripts => scripts.AddSharedGroup("TelerikJsGroup{0}"))
Line 59: .Render()
before:
@{
Html.Telerik().ScriptRegistrar()
.DefaultGroup(group => group.Enabled(false))
.Globalization(true)
.Scripts(scripts => scripts.AddSharedGroup("MyJsGroup{0}".FormatWith(AppHelper.VersionNumber)));
Html.Telerik().ScriptRegistrar()
.Scripts(scripts => scripts.AddSharedGroup("TelerikJsGroup{0}".FormatWith(AppHelper.VersionNumber)))
.Render();
}
after:
@(
Html.Telerik().ScriptRegistrar()
.DefaultGroup(group => group.Enabled(false))
.Globalization(true)
.Scripts(scripts => scripts.AddSharedGroup("MyJsGroup{0}".FormatWith(AppHelper.VersionNumber)))
)
@(Html.Telerik().ScriptRegistrar()
.Scripts(scripts => scripts.AddSharedGroup("TelerikJsGroup{0}".FormatWith(AppHelper.VersionNumber)))
.Render()
)