摘要: •实现input的自增:点击按钮input中的值自动增加,代码见备注。点击刷新就一直是值不变,只有点击提交才会变,分析原理。用开发人员工具篡改文本框的值自增就从新的值开始了。 1 <%@ WebHandler Language="C#" Class="Handler3" %> 2 3 using System; 4 using System.Web; 5 6 public class Handler3 : IHttpHandler { 7 int a = 0; 8 public void ProcessRequest (HttpContext 阅读全文
posted @ 2013-05-27 23:15 Big.Eagle 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 入门1.html•<form action="入门1.ashx">• <input type="text" name="username" /><input type="submit" />•</form>新建一个【一般处理程序】入门1.ashx,ProcessRequest中写 •context.Response.ContentType = "text/html"; •string username = context.Request[" 阅读全文
posted @ 2013-05-27 21:12 Big.Eagle 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 试验中发现,当form的method属性设置为get时,action(action='default.ashx?a=123')中带的参数总是被覆盖(a=123被覆盖掉丢失),如何避免呢?就是把method设置为post,才能使action中的自带参数传到服务器。 1 <%@ WebHandler Language="C#" Class="Handler2" %> 2 3 using System; 4 using System.Web; 5 6 public class Handler2 : IHttpHandler { 7 阅读全文
posted @ 2013-05-27 20:57 Big.Eagle 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 1 <%@ WebHandler Language="C#" Class="Handler2" %> 2 3 using System; 4 using System.Web; 5 6 public class Handler2 : IHttpHandler { 7 8 public void ProcessRequest (HttpContext context) { 9 //context.Response.ContentType = "text/plain";10 //context.Response.Write(& 阅读全文
posted @ 2013-05-27 20:22 Big.Eagle 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 该操作实现:在删除数据后输出------》“再过n秒跳转到列表页面”JSModel.htm文件: 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 3 <html xmlns="http://www.w3.org/1999/xhtml"> 4 <head> 5 <title></ti 阅读全文
posted @ 2013-05-27 19:51 Big.Eagle 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2013-05-27 10:18 Big.Eagle 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 1、Response.Redirect(); Response.Redirect(); 是可从服务器1到服务器2的,也就是在不同服务器之间转换。转向之后,浏览器中的地址栏中会显示新的网页的地址。 2、Server.Execute();只能本地服务器上的页面转换。说页面转换有些不严谨,准确的说应该是把Page2和跳转之前的页Page1按先后顺序写入缓冲区之后,一起输出的。此时会相当于在同一个页面先输出了Page2接着又在该页面输出了Page1.但是网页中的地址栏中显示的依然是上一个页面的地址。 3、Server.Transfer();只能本地服务器上的转换。与Server.Execute()一样 阅读全文
posted @ 2013-05-27 10:05 Big.Eagle 阅读(226) 评论(0) 推荐(0) 编辑