开发者

Label Html helper is show up as string literal <label...> contents instead of being rendered

Q: How do I get this to render as a ? It' showing up as string literal text instead of being renderd into an actual element.

public static class HtmlExtensions 
{
    public static string LabelX(this HtmlHelper htmlHelper, 
        string target, string text, string _class)
    {
        return (String.Format开发者_开发知识库( "<label class='{2}' for='{0}'>{1}</label>", target, text, _class);              
    }
} 


Return an MvcString not a regular string.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜