after click the button i want to reload page.
How can i do, Suggestion needed
after click the button i want to reload page.
How can i do, Suggestion needed
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Garima BansalRank #1,555 · 1K reputationPosted Nov 2, 2023, 5:44 AM EDT
here is the souce code for reload page in mvc
public ActionResult getLineDeptPending(decimal appcode) { if (Session["PPA_Authcookie"] != null) { var PPAAuthcookie = Convert.ToBase64String(Encoding.UTF8.GetBytes(Session["PPA_Authcookie"] + Request.UserHostAddress.Replace(".", Session["PPA_Authcookie_Random"].ToString()))); var httpCookie = Request.Cookies["PPA_AUTHCOOKIE"]; if (Request.UserHostAddress != null) { if (httpCookie != null && (!Session.IsNewSession && !string.IsNullOrEmpty(httpCookie.Value) && PPAAuthcookie.Equals(httpCookie.Value))) { if (System.Web.HttpContext.Current.Request.UrlReferrer != null) { int distcode = Convert.ToInt32(Session["DistCode"]); List result = new List(); using (PPAEntities db = new PPAEntities()) { var res = (from m in db.ppalinedeptflows where m.applnno == appcode && m.region == distcode select new Linedeptproposal { proposalid = (Int32)m.deptcode, updateddt = (DateTime)m.deptupdateddt, remarks = m.remarks, Mstatus = m.status, Muploaddoc = m.uploaddoc, Mapplnno = m.applnno, Muniqid = m.uniqid }).ToList(); decimal applicationno = Convert.ToDecimal(appcode); foreach (var itm in res) { var oprod = db.ppadeptmasts.Where(m => m.deptcode == itm.proposalid).Select(m => m.deptname).FirstOrDefault(); if (oprod != null) { itm.proposalname = oprod; } result.Add(itm); } } return Json(result, JsonRequestBehavior.AllowGet); } else { SesionReset(); FormsAuthentication.SignOut(); return RedirectToAction("Intro", "Intro"); } } else { SesionReset(); FormsAuthentication.SignOut(); return RedirectToAction("Intro", "Intro"); } } else { SesionReset(); FormsAuthentication.SignOut(); return RedirectToAction("Intro", "Intro"); } } else { SesionReset(); FormsAuthentication.SignOut(); return RedirectToAction("Intro", "Intro"); } }Anandu G NathRank #681 · 3.5K reputationPosted Dec 21, 2023, 11:18 PM EST
public class Home: Controller { public ActionResult Index() { // Your logic here // Redirect to the same view or another view return RedirectToAction("Home"); //Redirect Page } }