Razor Tip #2 : Inheritance & Configuration

Posted by: K. Scott Allen, on 13 Jan 2011 | View original | Bookmarked: 0 time(s)

You can change the base class of a Razor view in ASP.NET MVC using an @inherits directive. @inherits MyWebViewPage<dynamic> The default base class for a Razor view in ASP.NET MVC is WebViewPage<T>, and in most cases you don't need to fiddle with @inherits - it's more common to use the @model directive and just strongly type the default base class with a specific ViewModel type. But, when you really need to set a different base class for a view, you'll probably need to set the same...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: ASP.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 668 | Hits: 17

Similar Posts

  • Creating and writing ASP.NET 2.0 custom Configuration Sections more
  • Client Configuration in WCF 4.0 more
  • Custom Configuration Sections in 3 Easy Steps more
  • How to register automatically HTTP handler required by a Web server control more
  • A Quick One: Pulling Items Out of the Web.config more
  • Tips/Tricks and LINQ Slides+Demos from my Talk in Dallas more
  • CS Dev Guide: Configuration more
  • ASP.NET 2.0 Tips and Tricks and ASP.NET, IIS7 and ASP.NET AJAX End to End Talks more
  • ClientBlocker 1.5 more
  • Tip/Trick: Automating Dev, QA, Staging, and Production Web.Config Settings with VS 2005 more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD