public IActionResult SendOTP() { TwoFactModel model = new TwoFactModel(); model.receipientnumber = "+13194997346"; model.messagetobesent = "Hello hubby, this is from my c# program."; return(View(model)); }
public IActionResult SendOTP(TwoFactModel model) { try{ TempData["CurrentOTP"] = SendOTPhelper(model.receipientnumber, model.messagetobesent); return(RedirectToAction("VerifyOTP")); } catch { ViewBag.otpsuccessmsg = "OTP sent, if not received try again."; //add error to modelstste return(View()); } }