jquery - Get Ajax GET request parameters on my aspx page -



jquery - Get Ajax GET request parameters on my aspx page -

i sending checkbox value 1 asp page another.

i using jquery create ajax request:

$.ajax({ url: 'http:myurl.aspx', type: 'get', data: datatobedeleted, success: function () { alert('yay') }, error: function () { alert("data not deleted"); } });

how values in myurl.aspx page? tried request.querystring["data"] , request.querystring["datatobedeleted"] both gives no data.

am doing incorrectly?

it depends on construction of datatobedeleted parameter.

for example, if have:

datatobedeleted = {"id1": "10", "id2": "20"}; //object format

or

datatobedeleted = "id1=10&id2=20"; //string format

then read in server this:

string id1 = request.querystring["id1"].tostring(); string id2 = request.querystring["id2"].tostring();

hope helps. cheers

jquery asp.net ajax

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -