I have a simple view in which I am trying to access the Model properties. None of the model properties are available at this time (this is the problem).
If I use a <%= Model.blah %> then you can see that the model properties are available.
In the last photo you will now see that I can access the Model properties that I was trying to access in the first photo.
An error will be thrown if viewing this page if you don’t first do <%= with the model.
CS1061: 'object' does not contain a definition for 'User' and no extension method 'User' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)
So why is this happening?
Your view inherits
System.Web.Mvc.ViewMasterPage<AuthModel>which of course is wrong as it is anaspxpage. Make it inherit fromSystem.Web.Mvc.ViewPage<AuthModel>and it should work: