FineUI 官方论坛
标题: 表单无法执行验证? [打印本页]
作者: yanzhongnj 时间: 2014-3-28 10:10
标题: 表单无法执行验证?
在下面的表单中,RequiredFieldValidator 没有对 txtName 执行验证,请各位大侠解答!
谢谢
....
<body>
<form id="form1" runat="server">
<fageManager ID="ageManager1" AutoSizePanelID="anel1" runat="server" /> <fanel ID="panelAll" runat="server" Height="620px" Width="828px" ShowBorder="True" EnableFrame="true" EnableCollapse="false" Layout="HBox" BoxConfigAlign="Center"
BoxConfigPosition="Center" BoxConfigPadding="5px" BoxConfigChildMargin="0 5 0 0"
ShowHeader="false">
<Items>
<fanel ID="panelLeft" Title="左侧" ColumnWidth="50%" runat="server" BodyPadding="5px" ShowBorder="true"ShowHeader="false">
</fanel> <fanel ID="panelMiddle" Title="内容" Width="460px" AutoHeight="true" runat="server" BodyPadding="5px"ShowBorder="true"ShowHeader="false">
<Toolbars>
<f:Toolbar ID="Toolbar1"runat="server">
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnClose"EnablePostBack="false"Text="关闭" runat="server" Icon="SystemClose">
</f:Button>
<f:Button ID="btnSaveClose"Text="保存" runat="server" Icon="SystemSaveNew" >
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:ContentPanel ID="ContentPanelQuery"runat="server"AutoHeight="true"AutoWidth="true"
ShowHeader="false"Title="信息" Icon="ComputerMagnify">
<table cellpadding="0"cellspacing="0"class="table_add"id="tablemain">
<tr>
<td class="td_right">
活动名称:
</td>
<td>
<asp:TextBox ID="txtName"runat="server"Width="150px"MaxLength="30"> </asp:TextBox>
</td>
<td style="height: 5px;">
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"ControlToValidate="txtName"
ErrorMessage="活动名称不能为空" Width="76px"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="td_right">
地点:
</td>
<td>
<asp:TextBox ID="txtAddress"runat="server"Width="150px"MaxLength="30"></asp:TextBox>
</td>
<td style="height: 5px;">
</td>
</tr>
</table>
</f:ContentPanel>
</Items>
</fanel> <fanel ID="panelRight" Title="右侧" ColumnWidth="50%" runat="server" BodyPadding="5px" ShowBorder="true"ShowHeader="false">
</fanel> </Items>
</fanel>
</form>
</body>
....
欢迎光临 FineUI 官方论坛 (https://fineui.com/bbs/) |
Powered by Discuz! X3.4 |