Current filter:
                                You should refresh the page.
                                0
                                  • Hi,

                                    I have my grid in a panel like this:


                                     <dx:ASPxCallbackPanel ID="CallbackgvSAH" ClientInstanceName="CallbackgvSAH" OnCallback="CallbackgvSAH_callback" runat="server" Style="width: 825px;">
                                    <PanelCollection>
                                    <dx:PanelContent ID="PanelContent3" runat="server" SupportsDisabledAttribute="True">
                                    <dx:ASPxGridView ID="gvSAH" runat="server" ClientInstanceName="gvSAH" KeyFieldName="TCSAH01_ID" CssFilePath="~/App_Themes/Aqua/{0}/styles.css" CssPostfix="Aqua" AutoGenerateColumns="False"
                                    Width="100%">
                                    <Columns>

                                    .....

                                    each time I tried to expand I get this error.

                                    "response.redirect cannot be called in a page callback"


                                     Protected Sub CallbackgvSAH_callback(ByVal source As Object, ByVal e As DevExpress.Web.ASPxClasses.CallbackEventArgsBase)
                                     
                                                pars = e.Parameter.Split(";")
                                     
                                                Load_gvSAH(pars)
                                     
                                            End Sub

                                    Sub Load_gvSAH(Optional ByVal pParm As String() = Nothing)
                                     
                                                '---------------------------------------------
                                                Dim _SQL As StringBuilder = New StringBuilder("where Inv_Status_ID in (0,6) and Status_ID <> 12 ")
                                       ......

                                    gvSAH.DataSource = objSAH.DS(_SQL.ToString)
                                                gvSAH.SettingsBehavior.AllowFocusedRow = False
                                                gvSAH.DataBind()
                                                gvSAH.GroupBy(gvSAH.Columns("TCSTR01_Name"))
                                     
                                            End Sub

                                callback - redirection error.jpg
                                • P.S. I see that you are using AutoFormat settings. We recommend that you store control markup and AutoFormat settings within corresponding files (instead of mixing them) by using skin files:

                                  - Remove AutoFormat settings via a control designer;
                                  - Deploy the required DevExpress theme via the ASPxThemeDeployer tool.
                                  Choose the “Only skin files” (checked) - Copy only AutoFormat skin files to a project App_Themes/<AutoFormat Name> folder. This option requires the ASPxThemes assembly.
                                  - Specify the theme for the entire web site via the standard ASP.NET mechanism:
                                  Theming a Web Page or a Web Site

                                You must  log in  or  register  to leave comments

                                1 Solution

                                0

                                Hello,

                                It is impossible to redirect a page while processing a callback. Use the specially introduced ASPxWebControl.RedirectOnCallback method to accomplish this task.
                                Please refer to the Q305145 - How to execute redirect during callback / ASPxWebControl.RedirectOnCallback report where we discussed this issue in greater detail.

                                • [DX Support team: this comment was created by S Michaud]

                                  OK good idea but it is happening when we click on a Tab from ASPxPageControl.

                                  Im not able top track if it pass through Tabclick and ActiveTabChanging event but I think that happens only when my session has been terminated...

                                  Have you an idea how to fix it?

                                • Hi,

                                  Thank you for your response. I am afraid your scenario is not quite clear to me. Would your please describe your scenario in greater details. Some screenshots would be helpful. If it is possible, provide us with a markup and a code behind of the problematic page. This will help us to find an appropriate solution.

                                • S Michaud 07.13.2012

                                  Another example... when users click on a tab it tells : "response.redirect cannot be called in a page callback"

                                  This is the control:

                                   <dx:ASPxPageControl ID="tabControl" runat="server" ActiveTabIndex="0" Height="650px" TabSpacing="3px" Width="100%" EnableCallBacks="True" TabIndex="1">
                                                          <TabPages>
                                                              <dx:TabPage TabStyle-Width="80px" Text="Suivi">
                                                                  <ContentCollection>
                                                                      <dx:ContentControl ID="ContentControl2" runat="server" SupportsDisabledAttribute="True">
                                                                          <iframe src='../gui_config/tools/TransfertSessionValue.aspx?<%="sid=" & Session("Store_ID") & "&eid=" & Session("EmplID") & "&gid=" & Session("GrpID") & "&uid=" & Session("UserID") & "&sah_id=" & Request.QueryString("sah_id") & "&cid=" & Request.QueryString("cid")%>&path=~\\sah\\sah_form.aspx'
                                                                              scrolling='yes' marginwidth='0' marginheight='0' frameborder='0' vspace='0' hspace='0' width='100%' height='880'></iframe>
                                                                      </dx:ContentControl>
                                                                  </ContentCollection>
                                                              </dx:TabPage>
                                                              <dx:TabPage TabStyle-Width="80px" Text="Calendrier">
                                                                  <ContentCollection>
                                                                      <dx:ContentControl ID="ContentControl3" runat="server" SupportsDisabledAttribute="True">
                                                                          <iframe src='../gui_config/tools/TransfertSessionValue.aspx?<%="sid=" & Session("Store_ID") & "&eid=" & Session("EmplID") & "&gid=" & Session("GrpID") & "&uid=" & Session("UserID") %>&path=~\\sah\\sah_schedule.aspx'
                                                                              scrolling='no' marginwidth='0' marginheight='0' frameborder='0' vspace='0' hspace='0' width='100%' height='980'></iframe>
                                                                      </dx:ContentControl>
                                                                  </ContentCollection>
                                                              </dx:TabPage>
                                                              <dx:TabPage TabStyle-Width="80px" Text="Follow up" Visible="false">
                                                                  <ContentCollection>
                                                                      <dx:ContentControl ID="ContentControl4" runat="server" SupportsDisabledAttribute="True">
                                                                          <iframe src='../gui_config/tools/TransfertSessionValue.aspx?path=~\sah\sah_followup.aspx' scrolling='yes' marginwidth='0' marginheight='0' frameborder='0' vspace='0' hspace='0' width='100%'
                                                                              height='680'></iframe>
                                                                      </dx:ContentControl>
                                                                  </ContentCollection>
                                                              </dx:TabPage>
                                                          </TabPages>
                                                          <Paddings Padding="2px" PaddingLeft="5px" PaddingRight="5px" />
                                                          <ContentStyle>
                                                              <Border BorderColor="#AECAF0" BorderStyle="Solid" BorderWidth="1px" />
                                                          </ContentStyle>
                                                      </dx:ASPxPageControl>

                                • Sergey A (DevExpress) 07.16.2012

                                  Hi,

                                  Please, provide us with a sample project. We can't figure out the problem having only the aspx markup.

                                  Thanks!

                                You must  log in  or  register  to leave comments
                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.