我需要一些指导,因为我似乎无法找出问题所在。
我的表单页面(包括 SharePoint 向导控件)正在提交 3 次回发。为什么会发回 3 次?为什么不是一次?
请注意,我们正在使用绑定到对象数据源的两个 DevExpress AspxGridView 网格(不确定这是否与问题有关)。
我有以下标记:
<asp:ValidationSummary runat="server" ID="ValidationSummary1" />
<br />
<asp:Wizard runat="server" ID="wizRequest" ActiveStepIndex="0" OnNextButtonClick="wizRequest_NextButtonClick" DisplaySideBar="false">
<WizardSteps>
<asp:WizardStep runat="server" ID="wsSection1">
<fieldset>
<legend><%= Localization.GetRequest("Section1") %></legend>
<table style="width: 100%;">
<tr>
<th><%= Localization.GetRequest("Title") %></th>
<td colspan="5">
<asp:TextBox runat="server" ID="txtTitle" Width="95%" />
<asp:RequiredFieldValidator ID="rfvTitle" runat="server" ControlToValidate="txtTitle" Text="*" /></td>
</tr>
<tr>
<th><%= Localization.GetRequest("Summary") %></th>
<td colspan="5">
<asp:TextBox runat="server" ID="txtSummary" Width="95%" TextMode="MultiLine" Rows="3" />
<asp:RequiredFieldValidator ID="rfvSummary" runat="server" ControlToValidate="txtSummary" Text="*" /></td>
</tr>
...
以及以下代码:
[ToolboxItemAttribute(false)]
public partial class RequestWizardWebPart : WebPart
{
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Assert, UnmanagedCode = true)]
public RequestWizardWebPart()
{
}
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
InitializeControl();
}
protected void Page_Load(object sender, EventArgs e)
{
AddSupportingDocumentControl();
if (!Page.IsPostBack)
{
LoadControlsLocalizedText();
LoadLists();
LoadRequest();
}
}
...