开发者

why is my control name been rendered as text

开发者 https://www.devze.com 2023-02-18 02:35 出处:网络
Im new to mvc so this I am sure is a stupid question. I have created a view that looks something simlar to

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>
    }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消