This question is locked. New answers and comments are not allowed.
I have a partial view (which contains a Telerik upload control) that gets added to the contents of a JQuery modal dialog window via javascript. The problem is that clicking the the Telerik upload button does not do anything.
I think I am correctly following the instructions for working with data returned from a partial view, but pressing the
Upload..." button does not show a file browser and I do not see what the issue is.
I've attached a VS2010 solution to see exactly what the code is.
This is what my Page looks like:
The partial view looks like this:
I think I am correctly following the instructions for working with data returned from a partial view, but pressing the
Upload..." button does not show a file browser and I do not see what the issue is.
I've attached a VS2010 solution to see exactly what the code is.
This is what my Page looks like:
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %><%@ Import Namespace="Telerik.Web.Mvc.UI" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>Index</title> <link type="text/css" rel="Stylesheet" href="<%=Url.Content("~/Content/jquery-ui-1.8.11.custom.css")%>" /> <%= Html.Telerik().StyleSheetRegistrar() .DefaultGroup(group => group.Add("telerik.common.css") .Add("telerik.vista.css")) %> <script type="text/javascript" src="<%= Url.Content("~/Scripts/jquery-1.5.1.min.js")%>"></script> <script type="text/javascript" src="<%= Url.Content("~/Scripts/jquery-ui-1.8.11.custom.min.js")%>"></script> <script type="text/javascript"> $(document).ready(function () { $("a").button(); $("#test a").click(function () { $.ajax({ type: "GET", url: '<%=Url.Action("GetDialogContents") %>', success: function (htmlData) { var dialog = $("#dialog"); dialog.html(htmlData); dialog.dialog("open"); return false; }, error: function (xhr, status, error) { alert(xhr.statusText); } }); }); $('#dialog').dialog({ autoOpen: false, height: 370, width: 370, modal: true, buttons: { Close: function () { $(this).dialog("close"); } } }); }); </script></head><body> <h1>Test Page</h1> <div id="test"> <a href="#">Show Dialog</a> </div> <div id="dialog" title="Dialog Title"> </div> <%= Html.Telerik().ScriptRegistrar() .DefaultGroup(group => group .Add("telerik.common.min.js") .Add("telerik.upload.min.js") ).jQuery(false) %></body></html>The partial view looks like this:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %><%@ Import Namespace="Telerik.Web.Mvc.UI" %><%= Html.Telerik().Upload() .Name("attachments") .Async(async => async .Save("SaveFile", "Home") )%>