This question is locked. New answers and comments are not allowed.
In my application I am using nested master pages. I have the Site.Master, PublicSite.master used for the public side of the site and, SecureSite.master used obviously for the secure side of the app. I have the ScriptRegistrar statement in Site.Master. The public side works like a charm. I am now beginning to code the secure side. I have a log on view which uses the PublicSite.master and once the user is validated I go to a secure view which uses the SecureSite.master. Here is where the issue lies - for some reason when the app routes to the secure side, the ScriptRegistrar does not load the telerik.common.min.js and I am getting errors for the other telerik javascript files I add using the ScriptRegistrar statement. I am getting Microsoft JScript runtime error: 'undefined' is null or not an object and it breaks at the telerik.combobox.min.js line 1
b is undefined
I am using the latest version of Telerik MVC Extensions - 2010.2.825. I am getting the errors in IE and Firefox.
I can continue on to the secure view and here is the rendered html which shows the telerik.common.min.js is not loading:
Site.Master
SecureSite.master
Controller code which redirects to the view using SecureSite.master:
OperationsController:
Any help is very much appreciated!
function(a){var b=a.telerik;b.combobox=function(c,d) ...I am using the latest version of Telerik MVC Extensions - 2010.2.825. I am getting the errors in IE and Firefox.
I can continue on to the secure view and here is the rendered html which shows the telerik.common.min.js is not loading:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><script type="text/javascript" src="http://ajax.microsoft.com/ajax/4.0/1/globalization/en-US.js"></script><title> </title><link href="../../Content/Site.css" rel="stylesheet" type="text/css" /><link type="text/css" href="/Content/2010.2.825/telerik.common.min.css" rel="stylesheet"/> <link type="text/css" href="/Content/telerik.gmctelerik.css" rel="stylesheet"/> </head> <body> <div> <h2>Hello Donna Stewart from </h2> </div>
<script type="text/javascript" src="/Scripts/2010.2.825/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="/Scripts/2010.2.825/telerik.combobox.min.js"></script> <script type="text/javascript" src="/Scripts/2010.2.825/telerik.list.min.js"></script> <script type="text/javascript" src="/Scripts/curvycorners.src.js"></script> </body> </html>Site.Master
<%@ Master Language="VB" Inherits="System.Web.Mvc.ViewMasterPage" %> <%-- The following line works around an ASP.NET compiler warning --%> <%: ""%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <%: Ajax.GlobalizationScript()%> <title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title> <link href="../../Content/Site.css" rel="stylesheet" type="text/css" /> <%= Html.Telerik().StyleSheetRegistrar() _ .DefaultGroup(Function(group) group.Add("telerik.common.min.css")) _ .DefaultGroup(Function(group) group.Add("telerik.gmctelerik.css")) %> </head> <body> <div> <asp:ContentPlaceHolder ID="MainContent" runat="server" /> </div> <%= Html.Telerik.ScriptRegistrar().Scripts(Function(s) s.Add("/2010.2.825/telerik.combobox.min.js")) _ .Scripts(Function(s) s.Add("/2010.2.825/telerik.list.min.js")) _ .Scripts(Function(s) s.Add("/curvycorners.src.js")) %> </body> </html>SecureSite.master
<%@ Master Language="VB" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewMasterPage"%> <%@ Import Namespace="gmcps" %> <%@ Import Namespace="GMCResources.My.Resources" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <asp:ContentPlaceHolder ID="SecureContent" runat="server" /> </asp:Content> Controller code which redirects to the view using SecureSite.master:
<HttpPost()> _ Public Function LogOn(ByVal model As LogOnModel, ByVal returnUrl As String) As ActionResult If ModelState.IsValid Then Dim userInfo As New PersistentUserInfo Dim companyCodeToUse As Integer If model.CustCarrierFlag Then companyCodeToUse = model.CarrierCode Else companyCodeToUse = model.CompanyCode End If model.carrierList = New List(Of web_CarrierListResult) model.carrierList = Session("carrierList") If MembershipService.ValidateUser(companyCodeToUse, model.CustCarrierFlag, model.UserName, model.Password, userInfo) Then FormsService.SignIn(model.UserName, model.RememberMe) Session("GMCUserInfo") = userInfo If Not String.IsNullOrEmpty(returnUrl) Then Return Redirect(returnUrl) Else Return RedirectToAction("Operations", "Operations") End If Else ModelState.AddModelError("", "The user name or password provided is incorrect.") End If End If ' If we got this far, something failed, redisplay form Return View(model) End Function OperationsController:
Imports com.gmcps.Membership Public Class OperationsController Inherits BaseController ' ' GET: /Operations Function Operations() As ActionResult Dim userInfo As PersistentUserInfo = Session.Item("GMCUserInfo") Return View(userInfo) End Function End ClassAny help is very much appreciated!