Jan 20, 2009, 10:17 PM
[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" onclick="Coolite.AjaxMethods.ButtonClick();return false;" />
</form>
VBProtected 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