【问题标题】:htmlHelper.Label and jquery ValidationhtmlHelper.Label 和 jquery 验证
【发布时间】:2011-08-23 21:18:44
【问题描述】:

我正在尝试做一些 jQuery 验证。我很难为我的项目添加标签...

标签将成为 jQuery UI 对话框的一部分,每当我在我的作业中使用该标签时,jQuery UI 对话框都不会显示 div。我有点迷茫……

    %><%=Html.Label("",row)%><%

验证函数...

     $("#temp1").validate({
        rules: {
            HospitalFinNumber: {
                required: true,
                minlength: 6
            },
            AdminDate: { requried: true }
        }
    });

男孩你好,我很困惑。

【问题讨论】:

    标签: jquery-ui asp.net-mvc-2 html-helper


    【解决方案1】:

    这很可能是因为生成的 HTML 中标签上的 for 属性无效;注意你的外壳。您需要通过重载的Html.Label 方法明确指定这一点。

    【讨论】:

    • 感谢一个月后的帮助。但我简单地使用了 Response.Write("
    猜你喜欢
    • 2011-11-15
    • 2018-03-12
    • 2014-10-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多