public ActionResult GenerateToken(GenerateTokenViewModel model) { if (!ModelState.IsValid) return View(model); BankerDAL obj = new BankerDAL(); TokenInfo tf = new TokenInfo(); tf = obj.GenerateToken(model); ViewBag.CustomerID = String.Format("Customer ID : {0}", tf.CustomerID); ViewBag.token = String.Format("Token : {0}", tf.Token); ModelState.Clear(); return View(new GenerateTokenViewModel()); }