Get header from web method
问题 How can I get the header properties from a jquery ajax call. I am sending a code in the header so I need to read it in the webmethods: $.ajax({ type: "POST", url: url, data: data, contentType: "application/json; charset=utf-8", dataType: "json", success: success, error: error, headers: { 'aaaa': "code" } }); 回答1: On the client side (i am asuming asmx as you requested the webmethod), you can use the HttpContext.Current to get the current HttpContext. By reading the Request, you can get the