首页 新闻 会员 周边

webform的验证控件的EnableClientScript设为true为什么还是无法启动客户端脚本验证?

0
[已解决问题] 解决于 2014-12-20 15:58

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="App003_EmptyWebForm.Login" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        
        <asp:Label ID="Label1" runat="server" Text="用户名"></asp:Label>
        <asp:TextBox ID="txt_username" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="validate1" runat="server" ControlToValidate="txt_username" ErrorMessage="必填" ValidateRequestMode="Enabled"></asp:RequiredFieldValidator>
        <br />
        <asp:Label ID="Label2" runat="server" Text="密码"></asp:Label>
        <asp:TextBox ID="txt_pwd" runat="server" TextMode="Password"></asp:TextBox>
        <asp:RequiredFieldValidator ID="validate2" runat="server" ControlToValidate="txt_pwd" ErrorMessage="必填" ValidateRequestMode="Enabled"></asp:RequiredFieldValidator>
        <br />
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" ValidateRequestMode="Enabled" />
        
    </div>
    </form>
</body>
</html>

=====================

上面是代码,哪里有问题???

北在北方的主页 北在北方 | 初学一级 | 园豆:180
提问于:2014-12-17 22:26
< >
分享
最佳答案
0

页面自动加载的jquery文件找不到,问题是aspx页面自动加载的jquery文件在哪里设置,从哪里可以让aspx页面自动加载而不是手写,当然手写jquery引用客户端验证就没问题了。

北在北方 | 初学一级 |园豆:180 | 2014-12-20 08:54
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册