[FIXED] [V0.8.0] AjaxMethod Type=AjaxEventType.Load still sends back post data

  1. #1

    [FIXED] [V0.8.0] AjaxMethod Type=AjaxEventType.Load still sends back post data


    How can I get an AjaxMethod to not send post data (including viewstate) back to the server? I tried setting the Type to Load on the AjaxMethod attribute, but it is still sending back post data.

    ASPX

    <form id="form1" runat="server">
        <ext:ScriptManager ID="ScriptManager1" runat="server" Theme="Default" />
        
        <asp:TextBox runat="server" ID="txt"></asp:TextBox>
        
        <input type="button" value="Go" &#111;nclick="Coolite.AjaxMethods.ButtonClick();return false;" />
    </form>
    VB

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack AndAlso Not Ext.IsAjaxRequest Then
            Me.txt.Text = "Set Once"
        End If
    End Sub
    
    <AjaxMethod(Type:=AjaxEventType.Load)> _
    Public Sub ButtonClick()
        'should return empty string
        Me.ScriptManager1.AddScript(String.Format("alert('{0}');", Me.txt.Text))
    End Sub

  2. #2

    RE: [FIXED] [V0.8.0] AjaxMethod Type=AjaxEventType.Load still sends back post data

    Type is not documented in AjaxMethods Overview page in Examples Explorer, but source code shows I can set it to 'Load'on client side and then it works. *So I guess the server side setting is ignored. *Is there a global place where I can change the default from 'Submit' to 'Load'? *About 80% of the time, I want the Type to be 'Load'.
  3. #3

    RE: [FIXED] [V0.8.0] AjaxMethod Type=AjaxEventType.Load still sends back post data

    Hi,

    The Type property of AjaxMethodAttribute is fixed.
    *

Similar Threads

  1. [CLOSED] Export Data with Type= Load
    By amitpareek in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Aug 12, 2010, 10:04 AM
  2. Replies: 3
    Last Post: Jul 27, 2010, 7:54 PM
  3. grid panel data lost after post back
    By hassaannasir in forum 1.x Help
    Replies: 1
    Last Post: May 19, 2010, 7:09 AM
  4. Replies: 0
    Last Post: Nov 25, 2009, 6:24 AM
  5. Replies: 4
    Last Post: Nov 17, 2008, 8:16 AM

Posting Permissions