日期:2014-05-18  浏览次数:20425 次

为什么在使用的自定义的pagertemplate的翻页时会触发对页面上控件的有效性验证,急,在线等,先谢了
代码如下:

<%@   Page   Language= "C# "   AutoEventWireup= "true "   CodeFile= "test.aspx.cs "   Inherits= "Admin_WebIdentity_Modules_UserMgr_test "   %>

<!DOCTYPE   html   PUBLIC   "-//W3C//DTD   XHTML   1.0   Transitional//EN "   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

<html   xmlns= "http://www.w3.org/1999/xhtml "   >
<head   runat= "server ">
        <title> 无标题页 </title>
</head>
<body>
        <form   id= "form1 "   runat= "server ">
        <div>
                <asp:TextBox   ID= "TextBox1 "   runat= "server "> </asp:TextBox>
                <asp:RequiredFieldValidator   ID= "RequiredFieldValidator1 "   runat= "server "   ControlToValidate= "TextBox1 "
                        ErrorMessage= "RequiredFieldValidator "> </asp:RequiredFieldValidator>
                <asp:Button   ID= "Button1 "   runat= "server "   Text= "Button "   /> <br   />
                <asp:GridView   ID= "GridView1 "   runat= "server "   AllowPaging= "True "   AutoGenerateColumns= "False "   DataSourceID= "SqlDataSource1 ">
                        <Columns>
                                <asp:BoundField   DataField= "UserID "   HeaderText= "UserID "   InsertVisible= "False "   ReadOnly= "True "
                                        SortExpression= "UserID "   />
                                <asp:BoundField   DataField= "UserName "   HeaderText= "UserName "   SortExpression= "UserName "   />
                                <asp:BoundField   DataField= "Sex "   HeaderText= "Sex "   SortExpression= "Sex "   />
                                <asp:BoundField   DataField= "Phone "   HeaderText= "Phone "   SortExpression= "Phone "   />
                                <asp:BoundField   DataField= "Email "   HeaderText= "Email "   SortExpression= "Email "   />
                            &