摘要: asp.ne bbst源码分析1.登陆页面1.登陆页面登陆页面中需要注意的大致上就是两条:如何实现验证码?如何防止sql注入。1.如何实现验证码?验证码简单的实现可以通过在服务器端生成一个图片完成。前台的话添加一个img html控件,onclick事件中重新加载checkcode页面。后台中使用dotnet类库中自带的drawing来实现生成一个图片。代码即文档,代码如下:<img id="Img1" alt="看不清,请点击我!" onclick="this.src=this.src+'?'" src 阅读全文
posted @ 2010-12-16 18:55 qiang.xu 阅读(711) 评论(0) 推荐(0) 编辑
摘要: Gets a value that indicates whether the page is being rendered for the first time or is being loaded in response to a postback.private void Page_Load(){ if (!IsPostBack) { // Validate initially to force asterisks第一次加载 // to appear before the first roundtrip. Validate(); }} 阅读全文
posted @ 2010-12-16 18:24 qiang.xu 阅读(138) 评论(0) 推荐(0) 编辑