Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

Can View bag be used to pass message from one action to another. How?

user-image
Question ajoutée par Ubaid sayeed Mohd abdul sayeed , Senior Programmer , Moksha solutions
Date de publication: 2016/09/26
Zeeshan Amjad
par Zeeshan Amjad , CTO

Use TempData or Session. TempData is actually a wrapper on Session. It would be something like thisthis.TempData["yourkey"] = yourData;Or in case of sessionthis.Session["yourkey"] = yourData;Difference is that data will be deleted form the session when read. (that's why its call temp data )ViewBag won't maintain data from action to action. 

More Questions Like This