当前位置:网站首页 > 技术博客 > 正文

asx文件怎么打开



<%@ WebHandler Language="C#" Class="AjaxHandler" %> using System; using System.Web; public class AjaxHandler : IHttpHandler { public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string Cmd = context.Request["cmd"];//接收方法名参数 if (!string.IsNullOrEmpty(Cmd)) { System.Reflection.MethodInfo Method = this.GetType().GetMethod(Cmd, System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);//通过反射机制,直接对应到相应的方法 if (Method != null) { Method.Invoke(this, new object[] { context }); } } else { context.Response.Redirect("~/Login.aspx"); } } void DelContents(HttpContext context) { string strGuid = context.Request["Guid"];//接收参数 context.Response.Write("OK"); } public bool IsReusable { get { return false; } } }

版权声明


相关文章:

  • mysql日期时间函数大全2024-11-28 21:30:05
  • 特征选择pca2024-11-28 21:30:05
  • unittest框架介绍2024-11-28 21:30:05
  • mvvm react2024-11-28 21:30:05
  • c语言中指针p++到底什么意思2024-11-28 21:30:05
  • java怎么调用jframe窗口2024-11-28 21:30:05
  • windows测试路由命令2024-11-28 21:30:05
  • 数据库事务怎么理解2024-11-28 21:30:05
  • 异步和多线程的区别2024-11-28 21:30:05
  • java hashmap hashtable2024-11-28 21:30:05