12 2015 档案

摘要:、ASP.Net的验证码的作用对于一个预防攻击的web表单来讲,验证码通常是一个常见的措施。因为如果对于一些public区域的页面内容来讲,譬如一个登录表单,如果没有必要的安全措施,很可能遭到模拟登录的暴力破解攻击,要么轻易获得特定账户的登录信息,要么给服务器增加了大量的负荷,影响正常的服务。解决的... 阅读全文
posted @ 2015-12-30 14:57 小热包1 阅读(212) 评论(0) 推荐(0)
摘要:一般来说在aspx页面使用Session直接用Session["名字"]就可以使用,但是在ashx页面不能直接使用,需要通过HttpContext对象context去操作Session;如果直接在ashx页面取Session:context.Session["uid"]; 则取出来的是空值NUL... 阅读全文
posted @ 2015-12-30 14:50 小热包1 阅读(144) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2015-12-28 15:51 小热包1 阅读(147) 评论(0) 推荐(0)
摘要:后台源代码 check.aspx 界面using System;using Syste... 阅读全文
posted @ 2015-12-28 15:01 小热包1 阅读(233) 评论(0) 推荐(0)
摘要:测试内容11 测试内容22 测试内容33 水果 家电 v数码 服装 阅读全文
posted @ 2015-12-28 10:25 小热包1 阅读(185) 评论(0) 推荐(0)
摘要:匹配中文字符的正则表达式:程序代码[\u4e00-\u9fa5]评注:匹配中文还真是个头疼的事,有了这个表达式就好办了匹配双字节字符(包括汉字在内):程序代码[^\x00-\xff]评注:可以用来计算字符串的长度(一个双字节字符长度计2,ASCII字符计1)匹配空白行的正则表达式:程序代码\n\s*... 阅读全文
posted @ 2015-12-28 10:23 小热包1 阅读(147) 评论(0) 推荐(0)
摘要:/*获得TEXT.AREATEXT的值*/var textval = $("#text_id").attr("value");//或者var textval = $("#text_id").val();/*获取单选按钮的值*/var valradio = $("input[@type=radio][... 阅读全文
posted @ 2015-12-28 10:20 小热包1 阅读(110) 评论(0) 推荐(0)
摘要:代码页面using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;public partia... 阅读全文
posted @ 2015-12-28 08:56 小热包1 阅读(158) 评论(0) 推荐(0)
摘要:验证控件: 添加一个 jquery 文件 1:非空验证: RequiredFieldValidator1 控件 属性:ErrorMessage: 验证控件无效时提示信息:用户名不能为空!! ForeColor:字体前景色 Display: 程序的显示方式验证 ... 阅读全文
posted @ 2015-12-28 08:52 小热包1 阅读(149) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;public partial cl... 阅读全文
posted @ 2015-12-23 10:05 小热包1 阅读(105) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;public partial cl... 阅读全文
posted @ 2015-12-23 09:59 小热包1 阅读(146) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;public partial cl... 阅读全文
posted @ 2015-12-23 09:58 小热包1 阅读(156) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;public partial cl... 阅读全文
posted @ 2015-12-22 10:10 小热包1 阅读(135) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;public partial cl... 阅读全文
posted @ 2015-12-22 10:09 小热包1 阅读(165) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;public partial cl... 阅读全文
posted @ 2015-12-22 10:06 小热包1 阅读(124) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;public partial cl... 阅读全文
posted @ 2015-12-22 10:02 小热包1 阅读(122) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;public partial cl... 阅读全文
posted @ 2015-12-22 09:59 小热包1 阅读(134) 评论(0) 推荐(0)
摘要:Repeater 造模板 1: 头模板 只出现一次,一般是标题行 2:项模板 需要绑定字段 根据数据库数据源的多少 可自动生成 3: 交替项模板 奇偶行交替改变 4:脚模板 只出现一次绑定数据: 1:指定数据源: protected vo... 阅读全文
posted @ 2015-12-16 15:23 小热包1 阅读(128) 评论(0) 推荐(0)
摘要:1:单选框 RadioButton 属性: GroupName 组名 想要产生互斥效果:将GroupName设置成统一名字 看是否选中: bool sex = RadioButton1.Checked; Label1.Text = sex.ToString(); ... 阅读全文
posted @ 2015-12-16 08:55 小热包1 阅读(163) 评论(0) 推荐(0)
摘要:ListBox 列表框autopostback:true:if(!ispostback){}1:绑定数据: if(!IsPostBack) { NationDataContext context = new NationDataContext(); L... 阅读全文
posted @ 2015-12-15 15:13 小热包1 阅读(122) 评论(0) 推荐(0)
摘要:ListBox 列表框autopostback:true:if(!ispostback){}1:绑定数据: if(!IsPostBack) { NationDataContext context = new NationDataContext(); L... 阅读全文
posted @ 2015-12-15 14:34 小热包1 阅读(307) 评论(0) 推荐(0)
摘要:dropdownlist 下拉列表 if(!IsPostBack)//不是提交返回 是 第一次打开的 大多数load页面都要写次句话 {}l1 绑定数据 1: NationDataContext context = new NationDataContext(); //指定了数... 阅读全文
posted @ 2015-12-15 14:13 小热包1 阅读(171) 评论(0) 推荐(0)
摘要:1.TextBox:用户输入文本框 单行文本框 多行文本框 密码框2.显示文字:lable会生成Span标签 literall将文字原封不动的打到页面3.按钮:Button普通按钮 ImageButton图片按钮 LinkButton超链接按钮4.Image:图片工具 HyperLink:超链接... 阅读全文
posted @ 2015-12-15 14:07 小热包1 阅读(174) 评论(0) 推荐(0)