VS.NET 2012’s new features in “MVC 4, Razor v2”

Here are two cool enhancement in Razor v2! Enjoy reading!!

1. No need to use “@href” or “@url.content” anymore for resolving the Url. We can simply use “~” as we use it in ASP.NET development

Example:
< script src=”@Url.Content(“~/Scripts/jGrowl.js”)”>

can be just simply as below
< script src=”~/Scripts/jGrowl.js”>

Note: <space> has been added after “<” in < script> for the perfect view

2. Conditional attributes:

Please refer: http://vibrantcode.com/blog/2012/4/10/whats-new-in-razor-v2.html/

Advertisements

1 Comment »

  1. 1

    Valuable information. Fortunate me I discovered your site by accident, and
    I am shocked why this coincidence did not came about in advance!
    I bookmarked it.


RSS Feed for this entry

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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: