Reputation: 7164
I have this controller :
public ActionResult Giris(string KimlikNo)
{
return RedirectToAction("YeniBelge");
}
I have another controller :
public ActionResult YeniBelge(string KimlikNo)
{
//do stuff
}
How can I pass KimlikNo's value to YeniBelge controller? Thanks.
Upvotes: 0
Views: 1622
Reputation:
You can pass it using a route value. I assume you mean another method, not another controller
return RedirectToAction("YeniBelge", new { KimlikNo = KimlikNo });
If the methods are in different controllers, then use
return RedirectToAction("YeniBelge", "OtherControllerName", new { KimlikNo = KimlikNo });
Upvotes: 2