Developer Tip of the Day – ASP.NET MVC 3 and the @helper syntax within Razor (Html Helper extensions)

25 May

Quick intro: “Razor”, a new view-engine for ASP.NET MVC 3 speeds up the development in terms of writing view templates, and what’s more important, puts you in a place that you do not need to interrupt your coding to explicitly denote the start and end of server blocks withing your HTML. The best overview out there is, of course, at Scott Gu’s blog, so go ahead and read it if you need more insight into that.

A hidden “Razor” gem that I want to mention today is @helper syntax, which enables you to create reusable helper methods and use them on the go – again, Scott Gu’s post about it, and the solution of how to get an access to the ASP.NET MVC Html helper methods within which is not supported by default.

Advertisement

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.