I had this question I was looking for the answer and I saw this question's answer
What's the difference between ViewData and ViewBag?
which in the answer many people mentioned using neither ViewBag or ViewData is "safe". I did not understand why since I'm new to web applications and the whole concept of it and also to MVC overall. So my questions are:
- Why is ViewBag and ViewData not a safe way to pass data?
- What is the best way to pass data? (The most important question)
I really appreciate your help!