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...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
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...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.