我想在ASP.NET用户控件中使用ajax。
$.ajax({
type: "POST",
url: "*TCSection.ascx/InsertTCSection",
data: "{id:'" + id + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
var URL = msg.d;
alert(URL);
});
.cs 代码
[WebMethod]
public static string InsertTCSection(string id)
{
string result = "deneme";
return result;
}