VB、VB.NET
webservice 实现json模式
Kalet 发表于2019-07-28 浏览878 评论0
直接上代码publicstringGetUserInfoByOpenid(stringopenid){varweixinuser=newWeiXinUser();weixinuser.NickName=user.NickName;weixinuser.HeadImg=user.HeadPhoto;vardata=Newtonsoft.Json.JsonConvert.SerializeObject(weixinuser);stringcallbackMethodName=HttpContext.Current.Request.Params[&quo...

VB、VB.NET
WebService 返回json格式和返回xml格式的数据
Kalet 发表于2019-07-28 浏览955 评论0
返回json格式//usingSystem.Web.Script.Services; [WebMethod] [ScriptMethod(UseHttpGet=true,ResponseFormat=ResponseFormat.Json)] publicvoidHelloWorld() { &...