This is a migrated thread and some comments may be shown as answers.

[Solved] Sys.WebForms.PageRequestManagerParserErrorException PostBack in RadAjaxManager

1 Answer 214 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 04 Jun 2008, 10:02 PM
Goal is to have a form with RadAjaxManager, but with one Button
which posts back normally and writes out an Excel file via Response.Write(...)
So, RadAjaxManager just needs to let this button be implemented without any Ajaxification.

Already looked at
http://www.telerik.com/community/forums/thread/b311D-bddbka.aspx


What didn't work
  • Added EnableEventValidation="false" to button
    <
    asp:Button ID="btnExportToExcel" runat="server" Text="Export to Excel" Width="96px" Enabled="False" EnableEventValidation="false" /></td>

  • Added RadScriptManager1.RegisterPostBackControl(btnExportToExcel) to Page_Load

    Protected
    Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
           RadScriptManager1.RegisterPostBackControl(btnExportToExcel)
    End Sub

Using Telerik AJAX Manager v2008.1.515.20

All the Ajaxification works great.  If I set RadAjaxManager1.EnableAJAX = False, it also works fine.

Any suggestions to make this button fire without AJAX?

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 05 Jun 2008, 12:11 PM
Hi William,

What are the AjaxSettings for the AjaxManager - does it ajaxify a container containing the button and thus prevents you from easily resolving this by simply not including the button in the AjaxSettings?
You can also disable ajax only for this specific button directly from the AjaxManager by hooking up to the client-side OnRequestStart event:

  <script type="text/javascript"> 
            function mngRequestStarted(ajaxManager, eventArgs) 
            { 
              if(eventArgs.EventTarget == "MyButton") 
              { 
                 eventArgs.set_enableAjax(false);
              } 
            } 
            </script>

Hope this helps.

Sincerely yours,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Ajax
Asked by
William
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or