استفاده از RedirectToAction
سلام
برای استفاده از RedirectToAction از این دستور استفاده میکنم
returnRedirectToAction("PayViaCredit","ControllerN ame", new{paymentId=111111});
خود اکشنی که بهش ریدایرکت میشه به این صورت نوشته شده :
public ActionResult PayViaCredit(int paymentId)
{}
مشکل اهراز هویت وجود نداره. اما کلا کار نمیکنه تو نت هم به این صورت استفاده شده.!!!!!!!!!!
مشکل چیه دوستان؟
نقل قول: استفاده از RedirectToAction
چک کنید که Custom Route در RouteConfig قرار نداده باشید ، بالای اکشن رو چک کنید که HttpPost نزاشته باشید و کدتون رو دیباگ کنید ببینید به خط RedirectToAction میرسه یا نه .
اگر مشکل همچنان برقرار بود کد کامل 2 اکشن رو قرار بدید . ( همراه با Data Annotation ها )