Reputation: 9545
I am trying to do a ajax post to a aspx page . How do I read the variable "myVar"?
in the code below HttpContext.Current.Request("myVar")
brings back nothing
var p = { "myVar": JSON.stringify(tableOBJ) };
$.ajax({
type: "POST",
url: "Default2AJAX.aspx",
data: p,
success: function (data) {
}
});
Default2AJAX.aspx code behind
Partial Class Default2AJAX
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim s As String = HttpContext.Current.Request("myVar") ''not working???????
End Sub
End Class
Upvotes: 0
Views: 2635