首页 新闻 会员 周边

验证控件没执行

0
悬赏园豆:5 [已关闭问题] 关闭于 2015-10-10 10:07
<!--******************************增加页面代码********************************-->

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FSTP_ADPMS_TourInsDetail.aspx.cs" Inherits="FSTP_ADPMS_TourInsDetail" StylesheetTheme="ChildTheme" %>

<%@ Register Assembly="YYSSOFT.Lib2008.Web" Namespace="YYSSOFT.Lib2008.Web.UI.WebControls" TagPrefix="yysctl" %>
<%@ Register Assembly="BDHChina.EAI.Controls" Namespace="BDHChina.EAI.Controls" TagPrefix="cc1" %>
<%@ OutputCache Location="None" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script type="text/javascript" src="/js/jquery.js"></script>
    <script type="text/javascript" src="/js/jFuncommon.js"></script>
    <script type="text/javascript" src="/js/My97DatePicker/WdatePicker.js"></script>
</head>
<body>
    <form id="form1" runat="server" defaultbutton="btnAdd">
        <asp:ScriptManager ID="smDetail" runat="server" EnablePartialRendering="true">
        </asp:ScriptManager>
        <div class="maincontent">
            <asp:UpdatePanel ID="uplDetail" runat="server">
                <ContentTemplate>
                    <div class="panel">
                        <div class="title">明细</div>
                        <div class="content">
                            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="smartGrid2">
                                <asp:HiddenField ID="hidID" runat="server" />
                                <tr>
                                    <th width="13%" align="left">质检员姓名:</th>
                                    <td width="37%">
                                        <span id="Span4">
                                            <asp:DropDownList ID="ddlName" AppendDataBoundItems="true" runat="server" OnSelectedIndexChanged="ddlName_SelectedIndexChanged" AutoPostBack="true">
                                                <asp:ListItem Value="">请选择</asp:ListItem>
                                            </asp:DropDownList></span>
                                        <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator5"  ValidationGroup="Group"  ControlToValidate="ddlName" ErrorMessage="“质检员姓名”不能为空" Display="None" Height="5px" Width="5px" />
                                        <span class="RequiredWarningStyle" runat="server" id="Span5">*</span>
                                    </td>
                                    <th width="13%" align="left">检员登录名:</th>
                                    <td width="37%">
                                        <asp:TextBox ID="txtLoginName" runat="server" MaxLength="50" Enabled="False" />
                                        <asp:RequiredFieldValidator runat="server" ID="LoginName_Null_Check" ControlToValidate="txtLoginName"   ValidationGroup="Group" ErrorMessage="“检员登录名”不能为空" Display="None" Height="5px" Width="5px" />
                                        <span class="RequiredWarningStyle" runat="server" id="spLoginName">*</span>
                                    </td>
                                </tr>
                                <tr>
                                    <th width="13%" align="left">开始巡视时间:</th>
                                    <td width="37%">
                                        <asp:TextBox ID="txtBegTime" runat="server" Width="200px" CssClass="Wdate"
                                            onfocus="var timeCalendar=$dp.$('txtEndTime');WdatePicker({onpicked:function(){txtEndTime.focus();},skin:'whyGreen',maxDate:'#F{$dp.$D(\'txtEndTime\')}',readOnly:true,isShowClear:true,isShowWeek:false,dateFmt:'yyyy-MM-dd HH:mm:ss'})"></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1"  ValidationGroup="Group"  ControlToValidate="txtBegTime" ErrorMessage="“开始巡视时间”不能为空" Display="None" Height="5px" Width="5px" />
                                        <span class="RequiredWarningStyle" runat="server" id="Span1">*</span>

                                    <th width="13%" align="left">结束巡视时间:</th>
                                    <td width="37%">
                                        <asp:TextBox ID="txtEndTime" runat="server" Width="200px" CssClass="Wdate" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'txtBegTime\',{d:0})}',skin:'whyGreen',isShowClear:true,readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'});"></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2"  ValidationGroup="Group"  ControlToValidate="txtEndTime" ErrorMessage="“结束巡视时间”不能为空" Display="None" Height="5px" Width="5px" />
                                        <span class="RequiredWarningStyle" runat="server" id="Span2">*</span>
                                </tr>
                                <tr>
                                    <th width="13%" align="left">开始巡视地点(经度):</th>
                                    <td width="37%">
                                        <asp:TextBox ID="txtBegLongitude" runat="server" MaxLength="21" /><br />
                                        (东,0°至180°) (西,0°至-180°) 
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
                                                ControlToValidate="txtBegLongitude" Display="Dynamic" ErrorMessage="经度0°——180°(东行,标注E,一般用正数表示) 0°——180°(西行,标注W,一般用负数表示)"
                                                Height="5px"
                                                ValidationExpression="^-?([1-9]\d*|[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0)$"
                                                Width="5px" Enabled="true"  ValidationGroup="Group">*</asp:RegularExpressionValidator>
                                    </td>
                                    <th align="left" width="13%">开始巡视地点(纬度):</th>
                                     <td width="37%">
                                        <asp:TextBox ID="txtBegLatitude" runat="server" MaxLength="21" /><br />
                                        (东,0°至180°) (西,0°至-180°) 
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server"
                                                ControlToValidate="txtBegLatitude" Display="Dynamic" ErrorMessage="经度0°——180°(东行,标注E,一般用正数表示) 0°——180°(西行,标注W,一般用负数表示)"
                                                Height="5px"
                                                ValidationExpression="^-?([1-9]\d*|[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0)$"
                                                Width="5px"  ValidationGroup="Group">*</asp:RegularExpressionValidator>
                                    </td>                                
                                </tr>
                                <tr>
                                    <th align="left" width="13%">结束巡视地点(经度):</th>
                                     <td width="37%">
                                        <asp:TextBox ID="txtEndTimeLongitude" runat="server" MaxLength="21" /><br />
                                        (东,0°至180°) (西,0°至-180°) 
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server"
                                                ControlToValidate="txtEndTimeLongitude" Display="Dynamic" ErrorMessage="经度0°——180°(东行,标注E,一般用正数表示) 0°——180°(西行,标注W,一般用负数表示)"
                                                Height="5px"
                                                ValidationExpression="^-?([1-9]\d*|[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0)$"
                                                Width="5px">*</asp:RegularExpressionValidator>
                                    </td>                               
                                    <th align="left" width="13%">纬度结束巡视地点(纬度):</th>
                                        <td width="37%">
                                        <asp:TextBox ID="txtEndTimeLatitude" runat="server" MaxLength="21" /><br />
                                        (东,0°至180°) (西,0°至-180°) 
                                            <asp:RegularExpressionValidator ID="txtEndTie" runat="server"
                                                ControlToValidate="txtEndTimeLatitude" Display="Dynamic" ErrorMessage="经度0°——180°(东行,标注E,一般用正数表示) 0°——180°(西行,标注W,一般用负数表示)"
                                                Height="5px"
                                                ValidationExpression="^-?([1-9]\d*|[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0)$"
                                                Width="5px" ValidationGroup="Group">*</asp:RegularExpressionValidator>
                                    </td>                                                            
                                </tr>
                                <tr>
                                    <th align="left" width="13%">备注:</th>
                                    <input id="hidOrganiseUintID" type="hidden" runat="server" />
                                    <td colspan="3" width="37%">
                                        <asp:TextBox ID="txtMemo" runat="server" MaxLength="225" Rows="5" TextMode="MultiLine" />
                                    </td>
                                </tr>
                                <tr>
                                    <th align="left" width="13%">创建人:</th>
                                    <td width="37%">
                                        <asp:TextBox ID="txtCreatedBy" runat="server" Enabled="false" />
                                    </td>
                                    <th align="left" width="13%">创建时间:</th>
                                    <td width="37%">
                                        <asp:TextBox ID="txtCreatedDate" runat="server" Enabled="false" />
                                    </td>
                                </tr>
                                <tr>
                                    <th align="left" width="13%">修改人:</th>
                                    <td width="37%">
                                        <asp:TextBox ID="txtModifiedBy" runat="server" Enabled="false" />
                                    </td>
                                    <th align="left" width="13%">修改时间:</th>
                                    <td width="37%">
                                        <asp:TextBox ID="txtModifiedDate" runat="server" Enabled="false" />
                                    </td>
                                </tr>
                                </caption>
                            </table>
                        </div>
                    </div>
                    <div class="btngroup">
                        <yysctl:SmartButton runat="server" Width="60px" ID="btnAdd" Text="保 存" Message="确认保存?" MessageEnabled="True" OnClick="btnAdd_Click"  PermissionCheck="true"/>
                        <yysctl:SmartButton runat="server" Width="60px" ID="btnEdit" Text="修 改" Message="确认修改?" MessageEnabled="True" OnClick="btnEdit_Click" PermissionCheck="true" />
                        &nbsp;
                            <yysctl:SmartButton runat="server" Width="60px" ID="btnBack" Text="返 回" EnableViewState="False" OnClientClick="GoBackPrePage(); return false;" PermissionCheck="false" UseSubmitBehavior="false" CausesValidation="False" />
                        <br />
                        <br />
                        <asp:Label ID="lblError" CssClass="ErrLabel" runat="server" Width="300" />
                        <asp:ValidationSummary ID="ValidationSummary" EnableViewState="False" runat="server" DisplayMode="BulletList" HeaderText="请更正以下错误:" ShowMessageBox="True" ShowSummary="true" Enabled="true" ValidationGroup="Group"></asp:ValidationSummary>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <!-- 仓位信息 -->
                <div class="panel">
                    <div class="title">
                        地理信息
                    </div>
                    <asp:Panel runat="server" ID="plResult">
                        <div class="content">
                            <!--仓位信息 -->
                            <yysctl:SmartButton ID="btnNew" runat="server" Enabled="False" Text="新 建" OnClick="btnNew_Click"
                                CausesValidation="false" />
                        </div>
                        <div class="content">
                            <yysctl:SmartGridView ID="gvList" runat="server" PagerBinding="pagerList" SortButtonImageFold="~/Images/"
                                OnRowCommand="gvList_RowCommand" OnRowDataBound="gvList_RowDataBound">
                                <Columns>
                                    <asp:BoundField DataField="Hour" HeaderText="时间" DataFormatString="{0:yyyy-MM-dd HH:mm:ss }"></asp:BoundField>
                                    <asp:BoundField DataField="Longitude" HeaderText="经度"></asp:BoundField>
                                    <asp:BoundField DataField="Latitude" HeaderText="纬度"></asp:BoundField>
                                    <asp:TemplateField HeaderText="您可以">
                                        <HeaderStyle Width="60px" />
                                        <ItemTemplate>
                                            <yysctl:SmartImageButton ID="btnRowEdit" runat="server" BorderStyle="None" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID") %>'
                                                CommandName="UpdateRow" ImageUrl="~/images/edit.gif" ToolTip="编辑" Height="15"
                                                Width="15" CausesValidation="false" />
                                            <yysctl:SmartImageButton ID="btnDelete" runat="server" BorderStyle="None" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID") %>'
                                                CommandName="DeleteRow" ImageUrl="~/images/del.png" Message="确认删除?" MessageEnabled="True"
                                                ResourceId="" ToolTip="删除" Height="10" Width="10" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </yysctl:SmartGridView>
                            <div>
                                <yysctl:SmartPager ID="pagerList" runat="server" CssClass="pager" DataBindHandler="BindGrid"
                                    PageSize="10" TargetGrid="gvList" />
                            </div>
                            <div>
                                <asp:Label ID="lblLable2" runat="server" CssClass="ErrLabel" Width="300"></asp:Label>
                                <asp:HiddenField ID="hidDetailID" runat="server" />
                            </div>
                        </div>
                    </asp:Panel>
                </div>
                <!-- 显示有机产品明细 -->
                <!-- 添加有机产品信息 -->
                <asp:Panel ID="plYouJiDetail" Visible="false" runat="server">
                    <div class="panel">
                        <div class="title">
                            添加地理信息
                        </div>
                        <div class="content">
                            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="smartGrid2">
                                <tr>
                                    <th width="13%" align="left">时间:
                                    </th>
                                    <td width="37%">
                                        <asp:TextBox ID="txtHour" runat="server" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',skin:'whyGreen',readOnly:true,isShowClear:true});"
                                            Width="150px" CssClass="Wdate"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="ProductType_Null_Check" runat="server" Width="5px"
                                            ControlToValidate="txtHour" Display="None" ErrorMessage="“时间”不能为空" Height="5px"
                                            ValidationGroup="GroupDetail">*</asp:RequiredFieldValidator>
                                        <span class="RequiredWarningStyle">*</span>
                                    </td>
                                    <tr>
                                        <th width="13%" align="left">经度:</th>
                                        <td width="37%">
                                            <asp:TextBox ID="txtLongitude" runat="server" MaxLength="21" /><br />
                                            (东,0°至180°) (西,0°至-180°) 
                                            <asp:RegularExpressionValidator ID="TxtLongitude_no_format" runat="server"
                                                ControlToValidate="txtLongitude" Display="Dynamic" ErrorMessage="经度0°——180°(东行,标注E,一般用正数表示) 0°——180°(西行,标注W,一般用负数表示)"
                                                Height="5px"
                                                ValidationExpression="^-?([1-9]\d*|[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0)$"
                                                Width="5px" ValidationGroup="GroupDetail">*</asp:RegularExpressionValidator>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" Width="5px"
                                                ControlToValidate="txtLongitude" Display="None" ErrorMessage="“经度”不能为空" Height="5px"
                                                ValidationGroup="GroupDetail">*</asp:RequiredFieldValidator>
                                            <span class="RequiredWarningStyle">*</span>
                                        </td>
                                        <th width="13%" align="left">纬度:</th>
                                        <td width="37%">
                                            <asp:TextBox ID="txtLatitude" runat="server" MaxLength="21" /><br />
                                            (北,0°至90°) (南,0°至-90°)
                                             <asp:RegularExpressionValidator ID="TxtLatitude_no_format" runat="server"
                                                 ControlToValidate="txtLatitude" Display="Dynamic" ErrorMessage="纬度0°——90°(北,标注N,一般用正数表示)  0°——90° (南,标注S,一般用负数表示)"
                                                 Height="5px"
                                                 ValidationExpression="^-?([1-9]\d*|[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0)$"
                                                 Width="5px" ValidationGroup="GroupDetail">*</asp:RegularExpressionValidator>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" Width="5px"
                                                ControlToValidate="txtLatitude" Display="None" ErrorMessage="“纬度”不能为空" Height="5px"
                                                ValidationGroup="GroupDetail">*</asp:RequiredFieldValidator>
                                            <span class="RequiredWarningStyle">*</span>
                                        </td>
                                    </tr>
                            </table>
                            <div style="margin-top: 5px;">
                                <yysctl:SmartButton ID="btnSave" runat="server" PermissionCheck="true" Width="60px"
                                    Message="确认保存?" MessageEnabled="True" EnableViewState="true" Text="保 存" ValidationGroup="GroupDetail"
                                    OnClick="btnSave_Click" />
                                &nbsp;
                                <yysctl:SmartButton ID="btnClose" runat="server" Width="60px" Text="关 闭" PermissionCheck="false"
                                    CausesValidation="False" OnClick="btnClose_Click" />
                                <br />
                                <asp:Label ID="LblDetail" CssClass="ErrLabel" runat="server" Width="300"></asp:Label>
                                <asp:ValidationSummary ID="ValidationSummaryDetail" EnableViewState="False" runat="server"
                                    DisplayMode="BulletList" HeaderText="请更正以下错误:" ShowMessageBox="True" ShowSummary="False"
                                    ValidationGroup="GroupDetail"></asp:ValidationSummary>
                            </div>
                        </div>
                    </div>
                    </div> </div>
                </asp:Panel>
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <ContentTemplate>
                <!-- 仓位信息 -->
                <div class="panel">
                    <div class="title">
                        质量检查信息
                    </div>
                    <asp:Panel runat="server" ID="Panel1">
                        <div class="content">
                            <yysctl:SmartGridView ID="SmartGridView1" runat="server" PagerBinding="pagerList" SortButtonImageFold="~/Images/" OnRowDataBound="SmartGridView1_RowDataBound">

                                <Columns>
                                    <asp:BoundField DataField="Name" HeaderText="质检员姓名"></asp:BoundField>
                                    <asp:BoundField DataField="TpFarmName" HeaderText="农户姓名"></asp:BoundField>
                                    <asp:BoundField DataField="FarmPlotNewName" HeaderText="地块"></asp:BoundField>
                                    <asp:BoundField DataField="GrowPlantsName" HeaderText="作物"></asp:BoundField>
                                    <asp:BoundField DataField="Ini" HeaderText="作物阶段"></asp:BoundField>
                                    <asp:BoundField DataField="QualityProgram" HeaderText="质检项目"></asp:BoundField>
                                    <asp:BoundField DataField="QualityRes" HeaderText="质检结果"></asp:BoundField>
                                    <asp:BoundField DataField="Time" HeaderText="质检时间" DataFormatString="{0:yyyy-MM-dd HH:mm:ss }"></asp:BoundField>
                                </Columns>
                            </yysctl:SmartGridView>
                            <div>
                                <yysctl:SmartPager ID="SmartPager1" runat="server" CssClass="pager" DataBindHandler="BindGrid"
                                    PageSize="10" TargetGrid="gvList" />
                            </div>
                            <div>
                                <asp:Label ID="Label1" runat="server" CssClass="ErrLabel" Width="300"></asp:Label>
                                <asp:HiddenField ID="HiddenField1" runat="server" />
                            </div>
                        </div>
                    </asp:Panel>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
        <div class="black_overlay">
            <asp:UpdateProgress ID="uppgQueryResult" runat="server" DisplayAfter="20">
                <ProgressTemplate>
                    <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="24" height="24">
                        <param name="movie" value="/images/loading.swf" />
                        <param name="quality" value="high" />
                        <param name="wmode" value="transparent" />
                        <!-- 下一个对象标签用于非 IE 浏览器。所以使用 IECC 将其从 IE 隐藏。 -->
                        <!--[if !IE]>-->
                        <object type="application/x-shockwave-flash" data="/images/loading.swf" width="24" height="24">
                            <!--<![endif]-->
                            <object type="application/x-shockwave-flash" data="/images/loading.swf" width="24" height="24">
                                <param name="quality" value="high" />
                                <param name="wmode" value="transparent" />
                                <param name="swfversion" value="9.0.0.0" />
                            </object>
                        </object>
                    &nbsp;&nbsp;&nbsp;&nbsp;正在更新数据...
                </ProgressTemplate>
            </asp:UpdateProgress>
        </div>
    </form>
    <script type="text/javascript" language="javascript">function GoBackPrePage() { window.history.go(<%= HistoryGoNumb %>); } </script>
    <script type="text/javascript" language="javascript">function isOver(sText, len) { if (sText.value.length > len) { sText.value = sText.value.substring(0, len); } } </script>
</body>
</html>

我在经纬度框里输入111,点击按钮,验证没有执行

lctk的主页 lctk | 初学一级 | 园豆:69
提问于:2015-07-21 16:10
< >
分享
所有回答(1)
0

MVC用linq我倒是会,这个忘记了

如此低调的男人 | 园豆:842 (小虾三级) | 2015-07-21 17:40
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册