asynchronous - ASP.NET MVC best way to implement asynchronously in Controller -
The logs sorted version of interaction models of a database I have a contact form and an email with the form data is. Between two actions, it takes up to 2 seconds to complete. Although not much time, it is enough to disturb the impatient users.
Contact controller:
public class ContactController: Controller {// GET: contact Public Aekshnaresk Index () {return View (); } // Post: / Contact / [Actiteepiost] [Vadantiforgritin] Public Action Result Index (model. Contaktmodel contact) {if (Modlstet. ISI Walid) {XML Sseriylaijhr xml Sseriylaijr = new XML Sseriylaijr (Contact. Gettaip ()); (Stringwartr text Warit = Using new Stringrraitr ()) {xmlSerializer.Serialize (textWriter, contact); Log in. Create ("email", text author. Toastring ()); } Smtp.sendMail (sendTo, contact.Email, contact.Name, theme, contact. Comment, Aipiadres, from email, contact. Phone, sendBcc); // use RedirectToAction instead RedirectToRoute so / contact can be used to return a redirect Riro ( "default", new {action = "contactsucess", controller = "contact"}); } // Return form if not see valid return (contact); } // GET: / Contact / Snprksbsis Act Reshlt Snprksis () {ViewBag.IsContactPage = true; See Return (); }}
Siriyllaijing, Lojiging and Stimpi logic is what is the best way to make asynchronous / is successfully thanks / page basically my goal is blocking the overall progress calls the general solution Imelr have to stop in order to complete forms faster my work experience to move into the second process I
web head Hwar messaging contacts just like Msmkyu, e-mailer through Anssserbs or Rebitmkyu. When the web server wants to send an email, it sends a message to the email that sends the actual email.