Quote:
what is the difference between these two objects created.
None really.
ViewModel vm = new ViewModel();
Here you are defining a variable called vm and making it of type ViewModel, and then you assign it to a new instance of the ViewModel class.
var vm = new ViewModel();
Here you are defining vm as "var" which means you are letting the compiler work out the type rather than you entering it. So what the compiler does is use some basic intelligence and sees that you are assigning an object of type ViewModel to vm, so vm must be ViewModel, so it changes "var" to "ViewModel" and compiles this instead
ViewModel vm = new ViewModel();
As you can see that is identical to your previous line. "var" isn't a type or a dynamic variable like the ViewBag, it is simply a "programming aid" where you get the compiler to work the type out for you.
As for the rest of your post I didn't see the relevance, but if you want that message in the html then simply add it in the view where it is needed
@ViewBag.Message