ajax success 怎么返回值

2025-01-01 06:27:42
推荐回答(1个)
回答1:

///


/// 用户名是否存在
///

[WebMethod]
public void IsUsernameExist(string username)
{
string result = "false";
try
{
//...
//...
}
catch (Exception e)
{
result = "true";
}
finally
{
}
HttpContext.Current.Response.Write(result );
}

不用解析,直接就是true或者false