innerHTML "
<SCRIPT type=text/javascript>
jQuery('#stateList').tDropDownList({data:[{"Text":"Alabama","Value":"AL"},{"Text":"Arizona","Value":"AZ"},{"Text":"Arkansas","Value":"AR"},{"Text":"California","Value":"CA"},{"Text":"Colorado","Value":"CO"},{"Text":"Connecticut","Value":"CT"},{"Text":"Delaware","Value":"DE"},{"Text":"District of Columbia","Value":"DC"},{"Text":"Florida","Value":"FL"},{"Text":"Georgia","Value":"GA"},{"Text":"Idaho","Value":"ID"},{"Text":"Illinois","Value":"IL"},{"Text":"Indiana","Value":"IN"},{"Text":"Iowa","Value":"IA"},{"Text":"Kansas","Value":"KS"},{"Text":"Kentucky","Value":"KY"},{"Text":"Louisiana","Value":"LA"},{"Text":"Maine","Value":"ME"},{"Text":"Maryland","Value":"MD"},{"Text":"Massachusetts","Value":"MA"},{"Text":"Michigan","Value":"MI"},{"Text":"Minnesota","Value":"MN"},{"Text":"Mississippi","Value":"MS"},{"Text":"Missouri","Value":"MO"},{"Text":"Montana","Value":"MT"},{"Text":"Nebraska","Value":"NE"},{"Text":"Nevada","Value":"NV"},{"Text":"New Hampshire","Value":"NH"},{"Text":"New Jersey","Value":"NJ"},{"Text":"New Mexico","Value":"NM"},{"Text":"New York","Value":"NY"},{"Text":"North Carolina","Value":"NC"},{"Text":"North Dakota","Value":"ND"},{"Text":"Ohio","Value":"OH"},{"Text":"Oklahoma","Value":"OK"},{"Text":"Oregon","Value":"OR"},{"Text":"Pennsylvania","Value":"PA"},{"Text":"Rhode Island","Value":"RI"},{"Text":"South Carolina","Value":"SC"},{"Text":"South Dakota","Value":"SD"},{"Text":"Tennessee","Value":"TN"},{"Text":"Texas","Value":"TX"},{"Text":"Utah","Value":"UT"},{"Text":"Vermont","Value":"VT"},{"Text":"Virginia","Value":"VA"},{"Text":"Washington","Value":"WA"},{"Text":"West Virginia","Value":"WV"},{"Text":"Wisconsin","Value":"WI"},{"Text":"Wyoming","Value":"WY"}]});
</SCRIPT>
Here is the pertinent code:
The view with the link to the Telerik Window:
<%@ Control Language="VB" Inherits="System.Web.Mvc.ViewUserControl" %> <div id="publicmaincontent" class="maincontentclass" style="background-image:url(<%=Model.mainContentImage%>); background-repeat:no-repeat;"> <div id="maincontentright"> <p class="publiccontentheader"><%= Model.mainContentTitle%></p> <p class="publiccontenttext"><%= Model.mainContentText%></p> <% If Model.mainContentSubMenuList.Count > 0 Then %> <ul id="submenu"> <% For Each MenuItem In Model.mainContentSubMenuList%> <li> <% If MenuItem.ActionName.Equals("ROI_study1") Then%> <%= Html.ActionLink(MenuItem.Text, "roiCaseStudy", "SubContent", New With {.id = 1}, Nothing)%> <% ElseIf MenuItem.ActionName.Equals("ROI_study2") Then%> <%= Html.ActionLink(MenuItem.Text, "roiCaseStudy", "SubContent", New With {.id = 2}, Nothing)%> <% Else %> <%= Html.ActionLink(MenuItem.Text, "showSubContentPage", "SubContent", New With {.subAction = MenuItem.ActionName}, Nothing)%> <% End If%> </li> <% Next %> </ul> <% End If%> <a href="#" id="popup">Open Telerik Window</a> <span id="salespopup" class="windows7"> <% Html.Telerik().Window().Name("Window") _ .LoadContentFrom("salesRepresentatives", "Home") _ .Buttons(Function(buttons) buttons.Refresh().Maximize().Close()) _ .Draggable(True) _ .Height(350) _ .Width(450) _ .Resizable() _ .Visible(False) _ .Title("Find Your Sales Representative") _ .Render() %> </span> </div> </div> <% Html.Telerik().ScriptRegistrar().OnDocumentReady("$('#popup').bind('click', function openWindow(e){ $('#Window').data('tWindow').open();})")%><%@ Control Language="VB" Inherits="System.Web.Mvc.ViewUserControl(Of IEnumerable (Of gmcps.StateItem))" %> <div style="padding-left:10px; padding-top:15px;"> Please choose a state: <%= Html.Telerik().DropDownList.Name("stateList") _ .BindTo(New SelectList(Model, "stateId", "stateName"))%> </div> <div id="salesRepInfo"></div> Public Function salesRepresentatives() As ActionResult Dim salesStates As List(Of com.gmcps.CustInformation.Domain.WebInfo.web_GetSalesStatesResult) = WebInfoRepository.GetSalesStates() Dim salesStatesModel As New List(Of StateItem) For Each st In salesStates salesStatesModel.Add(New StateItem With {.stateName = st.StateName, .stateId = st.State}) Next Return PartialView(salesStatesModel) End Function <%@ 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("/curvycorners.js")) %> </body> </html>Thanks,
Donna