@using (Html.BeginForm("UploadSubscribers",
"Connect", FormMethod.Post, new { id = "IsValid", enctype =
"multipart/form-data" }))
{
<div class="panel
panel-info">
<div class="panel-heading">
<h3 class="panel-title">
Upload excel files for
subscribers and subscriptions.
</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-sm-9">
@(Html.Kendo().Upload()
.Name("files")
.Multiple(false)
.HtmlAttributes(new {
required = true })
.Events(events => events
.Cancel("onCancel")
.Complete("onComplete")
.Error("onError")
.Progress("onProgress")
.Remove("onRemove")
.Select("onSelect")
.Success("onSuccess")
.Upload("onUpload")
)
</div>
</div>
</div>
</div>
<div class="clearfix"></div>
<div class="pull-right">
<button type="submit" id="btnExcelUpload" class="btn
btn-primary">Upload</button>
<a id="btnCancel" class="btn btn-primary">Cancel</a>
</div>
<div class="clearfix"></div>
}
<script>
var onSelect = function (e) {
if (e !== undefined && e !== null) {
//TODO:..
}
};
var onCancel = function (e) {
if (e !== undefined && e !== null) {
var window = $("#window");
if (window !== undefined && window !== null) {
window.data("kendoWindow").close();
}
}
};
var onComplete = function (e) {
if (e !== undefined && e !== null) {
//TODO:as
per you.
}
};
var onError = function (e) {
if (e !== undefined && e !== null) {
//TODO:as
per you.
}
};
var onProgress = function (e) {
if (e !== undefined && e !== null) {
//TODO:as
per you.
}
};
var onRemove = function (e) {
if (e !== undefined && e !== null) {
//TODO:as
per you.
}
};
var onSuccess = function (e) {
if (e !== undefined && e !== null) {
//TODO:as
per you.
}
};
var onUpload = function (e) {
if (e !== undefined && e !== null) {
//TODO:as
per you.
}
};
</script>