标签:
--前台
$.ajax({
type: "POST",
contentType: "application/json",
url: "WebForm2.aspx/GetUserName",
data: "{}",
dataType: "json",
success: function(){.......}
});
--后台
[WebMethod(EnableSession = true)]
public static string GetUserName()
{
return "123";
}
标签:
原文地址:http://www.cnblogs.com/momjs/p/5724801.html