Hi
I've just updated an application to the new Prometheus release and have a problem.
I have a FormView containing a RadAjaxPanel. The first time I cause an event that should cause a callback, I get a full page postback and refresh.
When the page reloads, the css class applied to the RadAjaxPanel no longer seems to be in effect.
But subsequent events cause an Ajax callback as expected rather than the full postback that occurs the first time.
This problem didn't occur with the "classic" RadAjax.
I've attached the markup of the FormView below:
Thanks for any advice!
Matt
I've just updated an application to the new Prometheus release and have a problem.
I have a FormView containing a RadAjaxPanel. The first time I cause an event that should cause a callback, I get a full page postback and refresh.
When the page reloads, the css class applied to the RadAjaxPanel no longer seems to be in effect.
But subsequent events cause an Ajax callback as expected rather than the full postback that occurs the first time.
This problem didn't occur with the "classic" RadAjax.
I've attached the markup of the FormView below:
| <asp:FormView ID="fvPage" runat="server" DefaultMode="Insert" DataSourceID="sdsForm" DataKeyNames="PageCode" OnDataBound="fvPage_DataBound" OnItemInserted="fvPage_ItemInserted" OnItemInserting="fvPage_ItemInserting" OnItemUpdated="fvPage_ItemUpdated" OnItemUpdating="fvPage_ItemUpdating"> |
| <InsertItemTemplate> |
| <asp:ValidationSummary ID="vs1" runat="server" ForeColor="" CssClass="errorpanel" DisplayMode="List" EnableClientScript="true" ValidationGroup="Page" /> |
| <div id="formcontainer"> |
| <rad:RadAjaxPanel ID="rap1" runat="server" EnablePageHeadUpdate="False" LoadingPanelID="alp1" CssClass="zerodiv"> |
| <sam:FormLabel ID="flblSection" runat="server" ControlToLabel="ddlSection" Text="Website Section" ToolTip="Website Section" /><asp:DropDownList ID="ddlSection" runat="server" CssClass="forminputwider" TabIndex='<%# this.TabIndex %>' DataSourceID="sdsSection" DataTextField="SectionName" DataValueField="Code" AppendDataBoundItems="true" OnSelectedIndexChanged="CreateUniqueUrl" AutoPostBack="true" SelectedValue='<%# Bind("SectionCode") %>'><asp:ListItem Value="" Text="(Site Root)" /></asp:DropDownList><br class="clear" /> |
| <sam:FormLabel ID="flblPageName" runat="server" ControlToLabel="txtPageName" Text="Descriptive Page Name" ToolTip="Descriptive Page Name" /><asp:TextBox ID="txtPageName" runat="server" Text='<%# Bind("PageName") %>' ToolTip="Descriptive Page Name" TabIndex='<%# this.TabIndex %>' MaxLength="100" CssClass="forminputwider" OnTextChanged="CreateUniqueUrl" AutoPostBack="true" /><asp:RequiredFieldValidator ID="rfvPageName" ControlToValidate="txtPageName" ErrorMessage="Please enter a descriptive page name" ForeColor="" Display="None" ValidationGroup="Page" runat="server" /><br class="clear" /> |
| <sam:FormLabel ID="flblPageURL" runat="server" ControlToLabel="txtPageURL" Text="Page URL" ToolTip="Page URL" /><asp:TextBox ID="txtPageURL" runat="server" Text='<%# Bind("PageURL") %>' ToolTip="Page URL" TabIndex='<%# this.TabIndex %>' MaxLength="100" CssClass="forminputwider" Enabled="false" /><asp:RequiredFieldValidator ID="rfvPageURL" ControlToValidate="txtPageURL" ErrorMessage="A URL must be provided" ForeColor="" Display="None" ValidationGroup="Page" runat="server" /><br class="clear" /> |
| </rad:RadAjaxPanel> |
| <sam:FormLabel ID="flblBrowserTitle" runat="server" ControlToLabel="txtBrowserTitle" Text="Browser Title" ToolTip="Browser Title" /><asp:TextBox ID="txtBrowserTitle" runat="server" Text='<%# Bind("BrowserTitle") %>' CssClass="forminputwider" TabIndex='<%# this.TabIndex %>' MaxLength="250" /><asp:RequiredFieldValidator ID="rfvBrowserTitle" ControlToValidate="txtBrowserTitle" ErrorMessage="Please enter the text to appear in the browser title bar" ForeColor="" Display="None" ValidationGroup="Page" runat="server" /><br class="clear" /> |
| <sam:FormLabel ID="flblMetaKeywords" runat="server" ControlToLabel="txtMetaKeywords" Text="Meta Keywords" ToolTip="Meta Keywords" /><sam:SamTextBox ID="txtMetaKeywords" runat="server" Text='<%# Bind("MetaKeywords") %>' ToolTip="Meta Keywords" TabIndex='<%# this.TabIndex %>' MaxLength="250" TextMode="MultiLine" CssClass="forminputwider" /><br class="clear" /> |
| <sam:FormLabel ID="flblMetaDescription" runat="server" ControlToLabel="txtMetaDescription" Text="Meta Description" ToolTip="Meta Description" /><sam:SamTextBox ID="txtMetaDescription" runat="server" Text='<%# Bind("MetaDescription") %>' ToolTip="Meta Description" TabIndex='<%# this.TabIndex %>' MaxLength="250" TextMode="MultiLine" CssClass="forminputwider" /><br class="clear" /> |
| <div>Page Content</div> |
| <rad:RadEditor ID="rePageContent" runat="server" Skin="Telerik" ToolsFile="~/config/ToolsFile_PageEditor.xml" NewLineBr="false"> |
| <CssFiles> |
| <rad:EditorCssFile Value="~/styles/editor.css" /> |
| </CssFiles> |
| <ImageManager ViewPaths="~/uploads" UploadPaths="~/uploads" DeletePaths="~/uploads" SearchPatterns="*.jpg,*.gif,*.png" /> |
| <DocumentManager ViewPaths="~/uploads" UploadPaths="~/uploads" DeletePaths="~/uploads" SearchPatterns="*.txt,*.doc*,*.pdf" /> |
| <FlashManager ViewPaths="~/uploads" UploadPaths="~/uploads" DeletePaths="~/uploads" SearchPatterns="*.swf" /> |
| </rad:RadEditor> |
| </div> |
| <div id="formcontrol"> |
| <asp:ImageButton ID="btnSave" ImageUrl="images/btn-save.png" ToolTip="Save" CommandName="Insert" CausesValidation="true" ValidationGroup="Page" TabIndex="<%# this.TabIndex %>" runat="server" /> |
| <asp:ImageButton ID="btnCancel" ImageUrl="images/btn-cancel.png" ToolTip="Cancel" CommandName="Cancel" OnClientClick="CancelEdit(); return false;" CausesValidation="false" TabIndex="<%# this.TabIndex %>" runat="server" /> |
| </div> |
| <rad:RadAjaxLoadingPanel ID="alp1" runat="server" Transparency="30" BackColor="#E0E0E0" BorderColor="#CCCCCC" MinDisplayTime="1500"> |
| <asp:Image ID="imgLoading1" ImageUrl="~/RadControls/Skins/Samarind/Grid/loading.gif" BorderWidth="0px" AlternateText="Loading" runat="server" Style="margin-top: 10px;" /> |
| </rad:RadAjaxLoadingPanel> |
| </InsertItemTemplate> |
| <EditItemTemplate> |
| <asp:ValidationSummary ID="vs1" runat="server" ForeColor="" CssClass="errorpanel" DisplayMode="List" EnableClientScript="true" ValidationGroup="Page" /> |
| <asp:HiddenField ID="hfPageCode" Value='<%# Bind("PageCode") %>' runat="server" /> |
| <div id="formcontainer"> |
| <rad:RadAjaxPanel ID="rap1" runat="server" LoadingPanelID="alp1" CssClass="zerodiv" EnablePageHeadUpdate="false"> |
| <sam:FormLabel ID="flblSection" runat="server" ControlToLabel="ddlSection" Text="Website Section" ToolTip="Website Section" /><asp:DropDownList ID="ddlSection" runat="server" CssClass="forminputwider" TabIndex='<%# this.TabIndex %>' DataSourceID="sdsSection" DataTextField="SectionName" DataValueField="Code" AppendDataBoundItems="true" OnSelectedIndexChanged="CreateUniqueUrl" AutoPostBack="true" SelectedValue='<%# Bind("SectionCode") %>'><asp:ListItem Value="" Text="(Site Root)" /></asp:DropDownList><br class="clear" /> |
| <sam:FormLabel ID="flblPageName" runat="server" ControlToLabel="txtPageName" Text="Descriptive Page Name" ToolTip="Descriptive Page Name" /><asp:TextBox ID="txtPageName" runat="server" Text='<%# Bind("PageName") %>' ToolTip="Descriptive Page Name" TabIndex='<%# this.TabIndex %>' MaxLength="100" CssClass="forminputwider" OnTextChanged="CreateUniqueUrl" AutoPostBack="true" /><asp:RequiredFieldValidator ID="rfvPageName" ControlToValidate="txtPageName" ErrorMessage="Please enter a descriptive page name" ForeColor="" Display="None" ValidationGroup="Page" runat="server" /><br class="clear" /> |
| <sam:FormLabel ID="flblPageURL" runat="server" ControlToLabel="txtPageURL" Text="Page URL" ToolTip="Page URL" /><asp:TextBox ID="txtPageURL" runat="server" Text='<%# Bind("PageURL") %>' ToolTip="Page URL" TabIndex='<%# this.TabIndex %>' MaxLength="100" CssClass="forminputwider" Enabled="false" /><asp:RequiredFieldValidator ID="rfvPageURL" ControlToValidate="txtPageURL" ErrorMessage="A URL must be provided" ForeColor="" Display="None" ValidationGroup="Page" runat="server" /><br class="clear" /> |
| </rad:RadAjaxPanel> |
| <sam:FormLabel ID="flblBrowserTitle" runat="server" ControlToLabel="txtBrowserTitle" Text="Browser Title" ToolTip="Browser Title" /><asp:TextBox ID="txtBrowserTitle" runat="server" Text='<%# Bind("BrowserTitle") %>' CssClass="forminputwider" TabIndex='<%# this.TabIndex %>' MaxLength="250" /><asp:RequiredFieldValidator ID="rfvBrowserTitle" ControlToValidate="txtBrowserTitle" ErrorMessage="Please enter the text to appear in the browser title bar" ForeColor="" Display="None" ValidationGroup="Page" runat="server" /><br class="clear" /> |
| <sam:FormLabel ID="flblMetaKeywords" runat="server" ControlToLabel="txtMetaKeywords" Text="Meta Keywords" ToolTip="Meta Keywords" /><sam:SamTextBox ID="txtMetaKeywords" runat="server" Text='<%# Bind("MetaKeywords") %>' ToolTip="Meta Keywords" TabIndex='<%# this.TabIndex %>' MaxLength="250" TextMode="MultiLine" CssClass="forminputwider" /><br class="clear" /> |
| <sam:FormLabel ID="flblMetaDescription" runat="server" ControlToLabel="txtMetaDescription" Text="Meta Description" ToolTip="Meta Description" /><sam:SamTextBox ID="txtMetaDescription" runat="server" Text='<%# Bind("MetaDescription") %>' ToolTip="Meta Description" TabIndex='<%# this.TabIndex %>' MaxLength="250" TextMode="MultiLine" CssClass="forminputwider" /><br class="clear" /> |
| <asp:Panel ID="pnlPageContent" runat="server" CssClass="zerodiv"> |
| <div>Page Content</div> |
| <rad:RadEditor ID="rePageContent" runat="server" Skin="Telerik" ToolsFile="~/config/ToolsFile_PageEditor.xml" NewLineBr="false"> |
| <CssFiles> |
| <rad:EditorCssFile Value="~/styles/editor.css" /> |
| </CssFiles> |
| <ImageManager ViewPaths="~/uploads" UploadPaths="~/uploads" DeletePaths="~/uploads" SearchPatterns="*.jpg,*.gif,*.png" /> |
| <DocumentManager ViewPaths="~/uploads" UploadPaths="~/uploads" DeletePaths="~/uploads" SearchPatterns="*.txt,*.doc*,*.pdf" /> |
| <FlashManager ViewPaths="~/uploads" UploadPaths="~/uploads" DeletePaths="~/uploads" SearchPatterns="*.swf" /> |
| </rad:RadEditor> |
| </asp:Panel> |
| </div> |
| <div id="formcontrol"> |
| <asp:ImageButton ID="btnSave" ImageUrl="images/btn-save.png" ToolTip="Save" CommandName="Update" CausesValidation="true" ValidationGroup="Page" TabIndex="<%# this.TabIndex %>" runat="server" /> |
| <asp:ImageButton ID="btnCancel" ImageUrl="images/btn-cancel.png" ToolTip="Cancel" CommandName="Cancel" OnClientClick="CancelEdit(); return false;" CausesValidation="false" TabIndex="<%# this.TabIndex %>" runat="server" /> |
| </div> |
| <rad:RadAjaxLoadingPanel ID="alp1" runat="server" Transparency="30" BackColor="#E0E0E0" BorderColor="#CCCCCC" MinDisplayTime="1500"> |
| <asp:Image ID="imgLoading1" ImageUrl="~/RadControls/Skins/Samarind/Grid/loading.gif" BorderWidth="0px" AlternateText="Loading" runat="server" Style="margin-top: 10px;" /> |
| </rad:RadAjaxLoadingPanel> |
| </EditItemTemplate> |
| </asp:FormView> |
Thanks for any advice!
Matt