why is my control name been rendered as text
Im new to mvc so this I am sure is a stupid question. I have created a view that looks something simlar to
@using(Html.BeginForm())
{
@Html.RoundedCorner()
{
<h1>Hello world</h1>
}
}
Rounded corner is a just a help开发者_如何学编程er class to create a nice looking rounded corner css box. When the page is rendered the form is created and also the rounded css box is applied however so does the text
MyProductName.Helpers.RoundedCorner
I assume this is because im doing something wrong but what? any tips?
You haven't shown how does your RoundedCorner
helper look like but because I have some souvenirs of having written something like this you seem to be missing a using
statement:
@using(Html.BeginForm())
{
using (Html.RoundedCorner())
{
<h1>Hello world</h1>
}
}
精彩评论