In one View I have 3 submit button like this
<input type="submit" id="btnUpload" name="button" value="Upload" />
<input type="submit" id="btnDownload" name="button" value="Download" />
<input type="submit" id="btnSave" name="button" value="Save" />
these buttons are inside the begin form
in controller
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult BulkRenewalProcess(BusinessViewModel model, List<HttpPostedFileBase> BulkFile, string button)
{
if (button == "Upload")
{
model.PublicId = lstId;
return View(model);
}
else if(button == "Download")
{
// After my business logic I am returning same view.
return View(model);
}
else
{
}
}
When I am clicking on Save button which is the 2nd click and posting the same model. I am not getting the model.PublicId on which I am assigning the value on upload button click.
Someone please help me how to get the value