I have developed a web application using MVC architecture. My controller takes some time to process input, send it to the server and return it back to the view. I want a Loading/Please-wait kind of pop-up to be shown and exited automatically when the ActionResult returns the view. The corresponding part in my controller looks like this:
[HttpPost][STAThread]
public ActionResult Index(DropDownModel model)
{
BillingToolInterface_1.Program p = new BillingToolInterface_1.Program(state, billtype, recurring, budget, paytype, IA, spanish, veteran, status, LDC, rate, adjustments, billtemplate, readtype, server1, server2, choice, paramcheck);
//above step takes like 15 seconds to put the server result in
//DataJoin.Connector.data. I want a dialog to be displayed during this time.
model.Message = DataJoin.Connector.data;
return View(model);
}
You can use something like this to submit your form:
That will show the please wait message until the callback finishes. The please-wait could be some markup like:
The css for that markup could be (not the best css but works):