[HttpPost]
public ActionResult Submit(HttpPostedFileBase files,)
{
if (files != null && files.ContentLength > 0)
{
var filename = Path.GetFileName(files.FileName);
MemoryStream target = new MemoryStream();
files.InputStream.CopyTo(target);
byte[] data = target.ToArray();
//"Reconcile" is from DropDown1(Cabinate) and "Microsoft" is DropDown2(Publisher)
CheckInDoc( "Reconcile", "Microsoft", filename , data);
}
return RedirectToAction("Result");
}
<form method="post" action='@Url.Action("Submit")' style="width:45%">
<h3>Cabinate</h3>
@(Html.Kendo().DropDownList()
.Name("Cabinate")
.DataTextField("Text")
.DataValueField("Value")
.Events(e => e.Change("change"))
.BindTo(new List<SelectListItem>() {
new SelectListItem() {
Text = "Selet Cabinate",
Value = "-1"
},
new SelectListItem() {
Text = "Reconcile",
Value = "1"
},
new SelectListItem() {
Text = "Discovery",
Value = "2"
}
})
.Value("-1")
)
<h3>Folder</h3>
@(Html.Kendo().DropDownList()
.Name("Folder")
.BindTo(new List<string>() { "Select Publisher", "Microsoft", "Telerik", "Redhate" })
)
<div class="demo-section">
@(Html.Kendo().Upload()
.Name("files")
)
<p>
<input type="submit" value="Submit" class="k-button" />
</p>
</div>
</form>