开发者

In ASP.NET MVC 3, what class does Views and Partial Views inherit from?

In ASP.NET MVC 3, what class doe Views and Partial Views inheri开发者_高级运维t from and can the class (presumably it's a class somewhere) be inherited from to extend functionality.

For example, the default LogOnPartial control has the following (using Razor syntax)

Welcome <b>@Context.User.Identity.Name</b>!

Where is the Context object exposed. What class makes that available to the partial view?


They inherit from System.Web.Mvc.WebViewPage. http://msdn.microsoft.com/en-us/library/system.web.mvc.webviewpage%28VS.98%29.aspx In older versions of razor it was required to add the @inherits but newer versions don't.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜