WebSerice创建查询
[WebMethod] ///////////要加在方法前面,箭头处的按钮才能显示
public string MothodOne()
{
string Con = ConfigurationManager.ConnectionStrings["Shujuku"].ConnectionString;
SqlConnection conn = new SqlConnection(Con);
SqlDataAdapter sda = new SqlDataAdapter("select * from UserTable", conn);
DataSet ds = new DataSet();
sda.Fill(ds);
string json = JsonConvert.SerializeObject(ds);
return json;
}