There is a problem with master page views and models.
In the first image, I have a simple look in which I am trying to reach the model properties. No model properties are available at this time (this is a problem).
If I use & lt;% = Model.blah%> you can see that the model properties are available. Second picture.
In the last picture you will now see that I can use the model property which I was trying to reach in the first picture.
If you do not do this page with the first & lt;% = model CS1061: 'Object' has no definitions for 'user' and no extension method 'user' type 'object' Can not accept the first argument of (Do not you forget the use director or assembly reference?)
So why is this happening?
Your view inherits System.Web.Mvc.ViewMasterPage & lt; AuthModel & gt;
is incorrect because it is a aspx
page called System.Web.Mvc.ViewPage & lt; AuthModel & gt;
and it should work:
& lt;% @ Page Language = "C #" MasterPageFile = "~ / electricity / shared / base.master" inheritance = "System.web.mvc View Page & lt; AuthModel & gt;" & Gt%;
Comments
Post a Comment