I have a simple modal as follows,
public class Student{
public string Name;
public HttpPostedFileBase file;
// and some other properties of student
}
Required potion of view as follows,
@model Student
@using (Html.BeginForm("Index", "Student", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<input type="file" name="file" />
<input type="submit" name="Submit" id="Submit" value="Upload" />
/*complex javascript based user selection would not erase when user click on submit button*/
}
My post methord as follows,
[HttpPost]
public ActionResult Index(Student student){
//post data to the server and need got the feed back of save status success or fails. Based on that, some potuon of Ui need to change.
return View(student);
//ooh my complex ui erased.
}
As I describ the problem inside the code how can I overcome from the situation.
You might suggess that you can use ajax action methord here. But witch cannot use since i have need to sent post file to action.
I think this is impossible to make it happen but it is common problem.
Appriciate your suggession to make this work.(I can't use iframe here)