What does 'dataString' for the field 'data' in jQuery's .ajax API? -
for reason it's not listed in jquery website it's explaining .ajax api , want figure out 'datastring' defining because it's being used in ajax script i'm practicing with.
if sending 'data' webservice or page that's data field for. example if want insert new user database via ajax page you're talking needs know information.
for example:
$.ajax({ url: "/ajax.asmx/addto_cart", data: "{qty:" + qty + ",id:" + id + "}", success: function (msg) { var response = msg.d; $("#ctl00_shoppingcartmenu1_cartsum").html(response); } });
and page being called:
public string addto_cart(int qty, int id) { string dostuff ="lots of stuff done."; return dostuff; }
this .net should idea.
Comments
Post a Comment