Hi I am developing an application in MVC3. and i am stuck at one place. Everytime when control goes to IIndex1
action its argument value has become 0. But it should
You can use TempData.You can pass every types of data between to action, whether they are in same controller or not. Your code should be something like it:
public ActionResult GetMDN(string msisdn)
{
int sngid=10;
TempData["ID"] = sngid;
return RedirectToAction("IIndex");
}
public ActionResult IIndex()
{
int id = Convert.ToInt32(TempData["ID"]);// id will be 10;
}