I need to pass a customer ID for an uploadbox control on the SaveUrl("uploadFunction") call. On the Classic MVC control I could pass it on the RouteValues collection.
Is it possible to pass parameter ?
thanks
John
Hi John,
Sorry for the inconvenience caused.
At present there is no option to pass additional parameters to controller through save url or through events, and we have logged this as Feature Request. We will implement this feature in any of our future releases. We usually have an interval of at least three months between releases. And the feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity. So we request you to check with the product page in our website regarding this feature in the upcoming release. We will update this thread once this feature has been implemented.
Please let us know if you have any queries.
Regards,
HariKrishnan
Hi John,
Sorry for the inconvenience caused.
At present there is no option to pass additional parameters to controller through save url or through events, and we have logged this as Feature Request. We will implement this feature in any of our future releases. We usually have an interval of at least three months between releases. And the feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity. So we request you to check with the product page in our website regarding this feature in the upcoming release. We will update this thread once this feature has been implemented.
Please let us know if you have any queries.
Regards,
HariKrishnan
@Html.EJ().Uploadbox("UploadDefault").SaveUrl("SaveDefault").RemoveUrl("RemoveDefault").ClientSideEvents(e => e.Begin("onbegin"))
<script type="text/javascript">
function onbegin(args)
{
args.data = "customer ID"; // //set args.data for sending data to server. //
}
</script> |
public ActionResult SaveDefault(IEnumerable<HttpPostedFileBase> UploadDefault)
{
string AdditionParam = HttpContext.Request.Form["UploadDefault_data"];// data is received here
foreach (var file in UploadDefault)
{
var fileName = Path.GetFileName(file.FileName);
var destinationPath = Path.Combine(Server.MapPath("~/App_Data"), fileName);
file.SaveAs(destinationPath);
}
return Content("");
} |