Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am writing a partial view as below
@helper test {
hello
}
@test test
When I add this partialView to a page the word hello never shows? What am I doing wrong?
Hi Bob,
Take a look at this blog from ScottGu that explains the helper method syntax:
http://weblogs.asp.net/scottgu/asp-net-mvc-3-and-the-helper-syntax-within-razor
In your example if you want to display the hello text you could something like:
@helper SayHello() { <p>Hello!</p> } @SayHello()
/Michaël
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Help with partialview code
I am writing a partial view as below
@helper test {
hello
}
@test test
When I add this partialView to a page the word hello never shows? What am I doing wrong?
Hi Bob,
Take a look at this blog from ScottGu that explains the helper method syntax:
http://weblogs.asp.net/scottgu/asp-net-mvc-3-and-the-helper-syntax-within-razor
In your example if you want to display the hello text you could something like:
/Michaël
is working on a reply...