Re: Issue with a bind and Firefox submissions

  •  03-21-2008, 11:53 AM

    Re: Issue with a bind and Firefox submissions

    More information:
     
         I narrowed the problem down with MS AJAX and the update panel.  Below shows how this can be recreated.  In the app I am building, I create an aysnc update because a certain process takes a while and I want to show an update progress...  In Internet Explore it works but in Firefox it submits the bound text, not the updated text.....
     
     
     
    <%@ Page Language="C#" ValidateRequest="false" %>

    <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <script runat="server">

      protected void Page_Load(object sender, EventArgs e)
      {
        SelectedArticle.Text = "45";
      }

      protected void Wizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e)
      {
        CuteEditor.Editor articleText = (CuteEditor.Editor)FormView1.FindControl("ArticleFTB");
        Literal1.Text = articleText.Text;
      }
     
    </script>

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
      <title>Test Page</title>
    </head>
    <body>
      <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <div>
          <asp:Label ID="SelectedArticle" runat="server" Visible="false"></asp:Label>
          <asp:Wizard ID="Wizard1" runat="server" OnFinishButtonClick="Wizard1_FinishButtonClick">
            <WizardSteps>
              <asp:WizardStep ID="WizardStep1" runat="server" Title="Step 1">
                <asp:FormView ID="FormView1" runat="server" DataKeyNames="ArticleID" DataSourceID="SqlDataSource2">
                  <ItemTemplate>
                    ArticleID:
                    <asp:Label ID="ArticleIDLabel" runat="server" Text='<%# Eval("ArticleID") %>'></asp:Label><br />
                    PostDateTime:
                    <asp:Label ID="PostDateTimeLabel" runat="server" Text='<%# Bind("PostDateTime") %>'>
                    </asp:Label><br />
                    ArticleName:
                    <asp:Label ID="ArticleNameLabel" runat="server" Text='<%# Bind("ArticleName") %>'>
                    </asp:Label><br />
                    ArticleText:
                    <CE:Editor ID="ArticleFTB" runat="server" Text='<%# Bind("ArticleText") %>' AutoConfigure="Simple">
                    </CE:Editor>
                    <br />
                    AttachmentURLs:
                    <asp:Label ID="AttachmentURLsLabel" runat="server" Text='<%# Bind("AttachmentURLs") %>'>
                    </asp:Label><br />
                    PrivateFlag:
                    <asp:CheckBox ID="PrivateFlagCheckBox" runat="server" Checked='<%# Bind("PrivateFlag") %>'
                      Enabled="false" /><br />
                    CategoryName:
                    <asp:Label ID="CategoryNameLabel" runat="server" Text='<%# Bind("CategoryName") %>'>
                    </asp:Label><br />
                    UserID:
                    <asp:Label ID="UserIDLabel" runat="server" Text='<%# Bind("UserID") %>'></asp:Label><br />
                    CategoryFriendlyName:
                    <asp:Label ID="CategoryFriendlyNameLabel" runat="server" Text='<%# Bind("CategoryFriendlyName") %>'>
                    </asp:Label><br />
                    DepartmentID:
                    <asp:Label ID="DepartmentIDLabel" runat="server" Text='<%# Bind("DepartmentID") %>'>
                    </asp:Label><br />
                  </ItemTemplate>
                </asp:FormView>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:KnowledgeBaseConnectionString %>"
                  SelectCommand="SELECT ArticleTBL.ArticleID, ArticleTBL.PostDateTime, ArticleTBL.ArticleName, ArticleTBL.ArticleText, ArticleTBL.AttachmentURLs, ArticleTBL.PrivateFlag, ArticleTBL.CategoryName, ArticleTBL.UserID, CategoryTBL.CategoryFriendlyName, CategoryTBL.DepartmentID FROM ArticleTBL INNER JOIN CategoryTBL ON ArticleTBL.CategoryName = CategoryTBL.CategoryName WHERE (ArticleTBL.ArticleID = @ArticleID)">
                  <SelectParameters>
                    <asp:ControlParameter ControlID="SelectedArticle" Name="ArticleID" PropertyName="Text"
                      Type="Int32" />
                  </SelectParameters>
                </asp:SqlDataSource>
              </asp:WizardStep>
            </WizardSteps>
            <FinishNavigationTemplate>
              <asp:Button ID="FinishPreviousButton" runat="server" CausesValidation="False" CommandName="MovePrevious"
                Text="Previous" />
              <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                  <asp:Literal ID="Literal1" runat="server"></asp:Literal>
                  <asp:Button ID="FinishButton" runat="server" CommandName="MoveComplete" Text="Finish" />
                </ContentTemplate>
                <Triggers>
                  <asp:AsyncPostBackTrigger ControlID="FinishButton" EventName="Click" />
                </Triggers>
              </asp:UpdatePanel>
            </FinishNavigationTemplate>
          </asp:Wizard>
        </div>
      </form>
    </body>
    </html>
View Complete Thread