摘要: 1.首先在 aspx.cs文件里建一个公开的静态方法,然后加上WebMethod属性(要引入System.Web.Services)。 cs页面: [WebMethod]//如果要在这个方法里操作Session,需要将WebMethod的EnableSession属性设为true.即 [WebMethod(EnableSession=true)]或[WebMethod(true)] public static string SayHello() { return "hello"; }aspx页面:<script type="text/javascript&q 阅读全文
posted @ 2012-06-11 22:56 loongso 阅读(1172) 评论(0) 推荐(0) 编辑