回发多次发生

时间:2012-12-18 10:38:39

标签: c# asp.net sharepoint devexpress postback

我需要一些指导,因为我似乎无法弄清楚什么是错的。

我的表单页面(包括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();
                }
            }

    ...

0 个答案:

没有答案