I have a delegate method with is called periodic while WritingAnObject uploading the file. I would like to update div (ProgressUpdate) in my MVC page with args.PercentDone value. I appreciate any idea? Thanks,
//delegate method
private void displayProgress(object sender, ProgressArgs args)
{
//Console.WriteLine(args.PercentDone); //I want to display args.PercentDone in the page
}
//Controller
[HttpPost]
public ActionResult WritingAnObject(MyViewModel bovModel)
{
//DoSomeStuff which is cause calling displayProgress
return RedirectToAction("ListingSomeInfo", "testpart");
}
//View
<%using (Html.BeginForm("WritingAnObject", "testpart", FormMethod.Post, new { enctype = "multipart/form-data" }))
{%>
<%:Html.TextBox("catname") %>
<input type="file" id="fileupload" name="fileupload" />
<input type="submit" value="Upload" />
<%} %>
<div id= “ProgressUpdate”</div>