キャンセル ボタンに CausesValidation="false" を設定しましたが、[キャンセル] ボタンをクリックすると、ページが読み込まれてから数秒後に例外 (矢印) が表示されます。 property=false をバリデーターに追加しましたが、これらは問題の解決に役立ちませんでした。私も多くのスレッドをチェックしましたが、誰も解決策を提供しませんでした.誰かがこの問題に遭遇した場合は、私を助けてください.
<form id="form1" runat="server">
<div class="AdminContent">
<asp:Label ID="Label1" runat="server" CssClass="BreadcrumbActiveBig" Text="Group Membership" />
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<br />
<br />
<asp:HiddenField ID="HiddenFieldProfile" runat="server" />
<asp:FormView DefaultMode="Edit" ID="FormView1" runat="server" DataSourceID="PermGroupObjectDataSource1"
OnPreRender="FormView1_PreRender">
<EditItemTemplate>
<table>
<tr>
<td align="left" colspan="3">
<asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="Save" Width="67px"
CssClass="ButtonS1" />
<asp:Button ID="btnCancel" runat="server" OnClick="btnCancel_Click" Text="Cancel"
CssClass="ButtonS1" CausesValidation="false" />
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblGrpName" runat="server" Text="Group Name:" Width="138px" />
</td>
<td>
<asp:TextBox ID="GroupNameTextBox" MaxLength="50" runat="server" Text='<%# Bind("GroupName") %>'
Width="337px" ReadOnly="false" />
<asp:RequiredFieldValidator ID="rqrgFldVldtr_GroupName" ControlToValidate="GroupNameTextBox"
Display="Dynamic" ErrorMessage="<" meta:resourcekey="RequiredFieldValidator1Resource2"
runat="server"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblGrpDescr" runat="server" Text="Group Description:" Width="138px" />
</td>
<td>
<asp:TextBox ID="GroupDescrTextBox" MaxLength="255" runat="server" Text='<%# Bind("GroupDescr") %>'
Width="337px" ReadOnly="false" />
</td>
</tr>
<tr>
<asp:Panel ID="managedByPanel" runat="server" Visible="false">
<td>
<asp:Label ID="lblManagedByDescr" runat="server" Text="Managed by:" Width="138px" />
</td>
<td>
<asp:DropDownList ID="managedByDropDownList" runat="server">
<asp:ListItem Value="0" Text="Admin" />
<asp:ListItem Value="1" Text="AP Clerk admin & Admin" />
<asp:ListItem Value="2" Text="POC admin & Admin" />
</asp:DropDownList>
</td>
</asp:Panel>
</tr>
<tr>
<asp:Panel ID="lblFilterPanel" runat="server" Visible="false">
<td>
<asp:Label ID="LabelFilter" runat="server" Text="Exclude From Document Filter" Width="150px" />
</td>
<td>
<asp:CheckBox ID="chbExcludefromDocFilter" runat="server" Checked='<%# Bind("ExcludeFromUserFilter") %>' />
</td>
</asp:Panel>
</tr>
<tr>
<td valign="top">
<asp:Label ID="lblMembers" runat="server" Text="Members:" Width="80px" />
</td>
<td>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div>
<asp:ListBox ID="lbxMembers" runat="server" Style="overflow: auto; width: 500px;
height: 150px;" DataSourceID="MembersObjectDataSource1" DataTextField='ListName'
DataValueField="UName" SelectionMode="Multiple" />
<br />
<asp:ObjectDataSource ID="MembersObjectDataSource1" runat="server" DataObjectTypeName="System.Collections.Generic.List`1[[Accenture.CSTPrague.eAPI.GroupMember, eAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]"
SelectMethod="FetchGroupMembers" TypeName="Accenture.CSTPrague.eAPI.WebDB_Perm"
UpdateMethod="StoreGroupMembers">
<SelectParameters>
<asp:SessionParameter Name="o" SessionField="oPermGroup" Type="Object" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
<asp:Button ID="btnDeleteSelected" runat="server" OnClick="btnDeleteSelected_Click"
Text="Delete Selected" Width="106px" CssClass="ButtonS1" Style="margin: 4px 0px 8px 2px;" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnDeleteSelected" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblUserName" runat="server" Text="User name:" Width="141px" />
</td>
<td>
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:Panel ID="panel1" runat="server" DefaultButton="btnAdd">
<table>
<tr>
<td valign="top">
<accenture:lookupcontrol id="UserLookup" runat="server" lookupcommand="usr" maxlength="100"
validationgroup="addUser" disablevalidation="true" />
</td>
<td>
<asp:CustomValidator ID="cuvUserName" runat="server" ValidationGroup="addUser" Display="Dynamic"
ErrorMessage="<" EnableClientScript="false" OnServerValidate="cuvUserName_ServerValidate"
ControlToValidate="UserLookup" ValidateEmptyText="true" />
</td>
<td valign="top">
<asp:Button ID="btnAdd" runat="server" OnClick="btnAdd_Click" Text="Add User" ValidationGroup="addUser"
CausesValidation="true" CssClass="ButtonS1" Style="margin: 2px 0px 8px 2px;" />
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnAdd" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
</td>
</tr>
<tr style="vertical-align: top">
<asp:Panel ID="queryConditionPanel" runat="server" Visible="false">
<td>
<asp:Label ID="lblQueryCondition" runat="server" Text="Query Condition:" Width="138px" />
</td>
<td>
<accenture:lengthlimitedmultilinetextbox id="txtQueryCondition" runat="server" text='<%# Bind("QueryCondition") %>'
style="width: 500px" textmode="MultiLine" maxlength="1000" height="100px" cssclass="txtbox" />
</td>
</asp:Panel>
</tr>
</table>
</EditItemTemplate>
<InsertItemTemplate>
Gid:
<asp:TextBox ID="GidTextBox" runat="server" Text='<%# Bind("Gid") %>' /><br />
GroupName:
<asp:TextBox ID="GroupNameTextBox" MaxLength="50" runat="server" Text='<%# Bind("GroupName") %>' /><br />
Id:
<asp:TextBox ID="IdTextBox" runat="server" Text='<%# Bind("Id") %>'></asp:TextBox><br />
GroupDescr:
<asp:TextBox ID="GroupDescrTextBox" MaxLength="255" runat="server" Text='<%# Bind("GroupDescr") %>' /><br />
ExcludeFromUserFilter:
<asp:CheckBox ID="chbExcludefromDocFilter" runat="server" Checked='<%# Bind("ExcludeFromUserFilter") %>' /><br />
Members:
<asp:TextBox ID="MembersTextBox" runat="server" Text='<%# Bind("Members") %>' /><br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
Text="Insert" />
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
Text="Cancel" />
</InsertItemTemplate>
<ItemTemplate>
Gid:
<asp:Label ID="GidLabel" runat="server" Text='<%# Bind("Gid") %>' /><br />
GroupName:
<asp:Label ID="GroupNameLabel" runat="server" Text='<%# Bind("GroupName") %>' /><br />
Id:
<asp:Label ID="IdLabel" runat="server" Text='<%# Bind("Id") %>' /><br />
GroupDescr:
<asp:Label ID="GroupDescrLabel" runat="server" Text='<%# Bind("GroupDescr") %>' /><br />
<%--ExcludeFromUserFilter: <asp:Label ID="lblExcludefromDocFilter" runat="server" Text='<%# Bind("ExcludeFromUserFilter") %>' /><br />--%>
Members:
<asp:Label ID="MembersLabel" runat="server" Text='<%# Bind("Members") %>' /><br />
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit"
Text="Edit" />
</ItemTemplate>
</asp:FormView>
<asp:Label ID="lblMsg" runat="server" ForeColor="Red" />
<asp:ObjectDataSource ID="PermGroupObjectDataSource1" runat="server" DataObjectTypeName="Accenture.CSTPrague.eAPI.PermGroup"
SelectMethod="FetchPermGroupFromDB" TypeName="Accenture.CSTPrague.eAPI.WebDB_Perm"
UpdateMethod="StorePermGroupToDB" OnUpdating="PermGroupObjectDataSource1_Updating">
<SelectParameters>
<asp:SessionParameter Name="o" SessionField="oPermGroup" Type="Object" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
</form>