or
public class Contact { [UIHint("PhotoFileNameEditor")] public string PhotoFileName { get; set; } }}@(Html.Kendo().Upload() .Name("PhotoFileName") .Multiple(false) .Async(async => async.Save("SavePhoto", "Contact").Remove("RemovePhoto", "Contact").AutoUpload(true))) public ActionResult SavePhoto(IEnumerable<HttpPostedFileBase> PhotoFileName) { if (PhotoFileName != null) { foreach (var file in PhotoFileName) { var fileName = Path.GetFileName(file.FileName); var physicalPath = Path.Combine(Server.MapPath("~/Images/"), fileName); file.SaveAs(physicalPath); } } return Content("");}
$('#update-downloads-chart').on('click', function (e) { e.preventDefault(); $('#downloads-chart').data().kendoChart.dataSource.read( { minDate: $('#downloads-date-start').val(), maxDate: $('#downloads-date-end').val() });});<div class="widget"> <div class="widget-title"> <h5><i class="fa fa-bar-chart-o fa-fw"></i> Downloads by Category</h5> </div> <div class="widget-content debug"> @(Html.Kendo().Chart<Models.ChartDataItem>() .Name("downloads-chart") .HtmlAttributes(new { @class = "pie" }) .Theme("bootstrap") .DataSource(ds => ds.Read(read => read.Action("getdownloadsbycategory", "admin"))) .Legend(true) .Series(series => series .Donut("DataValue", "DataText") .Overlay(ChartPieSeriesOverlay.None) .Labels(labels => labels .Visible(true) .Align(ChartPieLabelsAlign.Circle) .Position(ChartPieLabelsPosition.Center) .Color("#fff")) .StartAngle(0) .Name("Download Type")) .Tooltip(tooltip => tooltip .Visible(true) .Template("#= dataItem.DataText # - #= dataItem.DataValue #")) ) </div> <div class="widget-controls"> <div class="date-label"> Date range: @(Html.Kendo().DatePicker() .Name("downloads-date-start") .Value(today.AddDays(-6).ToShortDateString()) .HtmlAttributes(new { @class = "datepicker" }) ) to @(Html.Kendo().DatePicker() .Name("downloads-date-end") .Value(today.ToShortDateString()) .HtmlAttributes(new { @class = "datepicker" }) ) <button type="button" class="btn btn-small" id="update-downloads-chart">Update</button> </div> </div></div>sort=&group=&filter=