摘要:
queryPage.aspx:private void btnEnter_Click(object sender, System.EventArgs e){ Server.Transfer("ResultPage.aspx");}ResultPage.aspx:public class ResultPage : System.Web.UI.Page{ private void Page_Load(object sender, System.EventArgs e) { //转换一下即可获得前一页面中输入的数据 QueryPage queryPage = ( QueryPag 阅读全文
摘要:
Global.asax代码: void Application_Error(object sender, EventArgs e) { // 在出现未处理的错误时运行的代码 Exception objErr = Server.GetLastError().GetBaseException(); string error = string.Empty; string errortime = string.Empty; string erroraddr = string.Empty; string errorinfo = string.Empty; string errorsource = str 阅读全文
摘要:
1 /// <summary> 2 /// 图片防盗链 3 /// </summary> 4 public class ImgHandler : IHttpHandler 5 { 6 const string errImg = "/Content/daolian.jpg"; 7 public void ProcessRequest(HttpContext context) 8 { 9 // 获取文件服务器端物理路径10 string FileNam... 阅读全文