Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 01, 2012 03:13 AM by Q.Fei
Member
2 Points
9 Posts
Jun 30, 2012 06:05 AM|LINK
Hello,guys
There is a razor syntax when using webgrid helper i am confused ,please see the following code:
grid.Column(format:@<strong>@item.Title</strong>)
i know the second @ sign means transit from html to c#, but what does the first @ sign mean? if remove the first @ sign the page render will fail.
thanks!
All-Star
154828 Points
19853 Posts
Moderator
MVP
Jun 30, 2012 07:45 AM|LINK
The first @ sign tells the Razor parser that the the following section <striong>@item.Title</strong> is a template: http://haacked.com/archive/2011/02/27/templated-razor-delegates.aspx
Jul 01, 2012 03:13 AM|LINK
Thanks for reply!
Q.Fei
Member
2 Points
9 Posts
Question on webgrid razor syntax
Jun 30, 2012 06:05 AM|LINK
Hello,guys
There is a razor syntax when using webgrid helper i am confused ,please see the following code:
i know the second @ sign means transit from html to c#, but what does the first @ sign mean? if remove the first @ sign the page render will fail.
thanks!
Mikesdotnett...
All-Star
154828 Points
19853 Posts
Moderator
MVP
Re: Question on webgrid razor syntax
Jun 30, 2012 07:45 AM|LINK
The first @ sign tells the Razor parser that the the following section <striong>@item.Title</strong> is a template: http://haacked.com/archive/2011/02/27/templated-razor-delegates.aspx
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
Q.Fei
Member
2 Points
9 Posts
Re: Question on webgrid razor syntax
Jul 01, 2012 03:13 AM|LINK
Thanks for reply!