Loosing Route data in RedirectToAction
- by user1512359
hi i have a weird problem and here we go:
i am redirecting using this command :
return RedirectToAction("ViewMessage", "Account", new {id = model.MessageId});
but in ViewMessage action when i try to get id, its null ?!?!?!?!??
string strMessageId = RouteData.Values["id"] as string;
i have done this code in lots of places and it works fine but i dont know what is going on here.... :(
i know i can use TempData but i dont want to :)