用juery的ajax方法调用aspx.cs页面中的webmethod方法示例
首先在 aspx.cs文件里建一个公开的静态方法,然后加上WebMethod属性。 如: [WebMethod] public static string GetUserName() { //...... } 如果要在这个方法里操作session,那还得将WebMethod的EnableSession 属性设为true 。即: [WebMethod(EnableSession = true)]//或[WebMethod(true)] public st...