Whatt's the difference between ViewData and ViewBag?

How to use textbox and ViewBag value in controller method?