文章分类 -  ASP.NET

1

SQL语句分页实现(转)
摘要:实际项目中暂没使用过 留着做个记录以备时需 存储过程: create PROCEDURE pagelist @tablename nvarchar(50), @fieldname nvarchar(50)='*', @pagesize int,--每页显示记录条数 @currentpage int,--第几页 @orderid nvarchar(50),--主键排序 @sort int,-... 阅读全文

posted @ 2008-11-14 13:09 Edward Xie 阅读(1443) 评论(0) 推荐(0) 编辑

repeater控件实现 编辑 删除等 操作
摘要:' Comm... 阅读全文

posted @ 2008-11-14 13:05 Edward Xie 阅读(4845) 评论(3) 推荐(3) 编辑

detailview状态设置
摘要:protected void Page_Load(object sender, EventArgs e) { if (Request.Params["id"] == null) { this.dvBookList.DefaultMode = DetailsViewMode.Insert; } } 阅读全文

posted @ 2008-11-14 13:04 Edward Xie 阅读(363) 评论(3) 推荐(0) 编辑

repeater控件动态数据绑定使用
摘要:通常用于效率优先的使用中代替gridview ASPX代码 ... 阅读全文

posted @ 2008-11-14 01:49 Edward Xie 阅读(3808) 评论(0) 推荐(1) 编辑

3层模型常用代码
摘要:///////////////////////////////////////////////////// ///////////////////////////////////////////////////// //引用关系 BLL DALFactory IDAL Model UI BLL Model DALFactory IDAL O... 阅读全文

posted @ 2008-11-14 00:08 Edward Xie 阅读(317) 评论(0) 推荐(0) 编辑

.net中的事务
摘要:private void btnTransfer_Click(object sender, System.EventArgs e) { lblAccount1.Text=" "; lblAccount2.Text=" "; int CurrBalance; string strSQL = "Select Balance FROM Account where... 阅读全文

posted @ 2008-11-09 21:43 Edward Xie 阅读(132) 评论(0) 推荐(0) 编辑

RSS的发布
摘要:ASPX页面 Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> 第三波网络书店 www.apatech.com 第三波网络书店 Copyright 2007-2009 by 第三波网络书店 ... 阅读全文

posted @ 2008-11-07 01:14 Edward Xie 阅读(172) 评论(0) 推荐(0) 编辑

Datalist利用PageDataSource对象在3层模型中的分页
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->publicpartialclassBookList:System.Web.UI.Page { protectedvoidPage_Load(objectsend... 阅读全文

posted @ 2008-11-07 00:44 Edward Xie 阅读(286) 评论(0) 推荐(0) 编辑

一个好用的日历控件
摘要:下载My97DatePicker 用法: 无标题页 阅读全文

posted @ 2008-11-06 00:14 Edward Xie 阅读(305) 评论(0) 推荐(0) 编辑

文件上传代码
摘要:ASPX 无标题页 CS using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using... 阅读全文

posted @ 2008-11-05 23:38 Edward Xie 阅读(323) 评论(0) 推荐(0) 编辑

验证提示脚本
摘要:this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", ""); 阅读全文

posted @ 2008-11-05 17:57 Edward Xie 阅读(108) 评论(0) 推荐(0) 编辑

简易下拉列表联动
摘要:using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.W... 阅读全文

posted @ 2008-11-04 21:22 Edward Xie 阅读(140) 评论(0) 推荐(0) 编辑

XML & ASP.NET
摘要:XML DOM节点 XmlNode XmlDocument模型 属性 HasChildNodes 有子节点返回true ChildNodes 子节点集合 ParentNode 获取父节点 没有返回null InnerXml 节点子节点串联值 InnerText 节点中标记值 OuterXml 该节点及子节点所有 NodeType 枚举值 Te... 阅读全文

posted @ 2008-11-02 16:08 Edward Xie 阅读(214) 评论(0) 推荐(0) 编辑

form验证
摘要:--> //*号所有 ?匿名 /authorization> if (验证合法) System.Web.Security.FormsAuthentication.redirectFromLoginPage(this.TextBox1.Te... 阅读全文

posted @ 2008-11-01 22:18 Edward Xie 阅读(219) 评论(0) 推荐(0) 编辑

数据绑定控件
摘要:数据绑定 DataBinder.Eval(Container.DataItem, “rowname”); Repeater ItemTemplate AlternatingItemTemplate HeaderTemplate FooterTemplate SeparatorTemplate DataList ItemTemplate AlternatingItemTemplate Hea... 阅读全文

posted @ 2008-10-30 06:48 Edward Xie 阅读(273) 评论(0) 推荐(0) 编辑

一个项目中的DBHelp实现
摘要:using System; using System.Collections.Generic; using System.Text; using System.Data.SqlClient; using System.Data; namespace MyBookShop.DAL { public static class DBHelper { private s... 阅读全文

posted @ 2008-10-27 23:58 Edward Xie 阅读(1598) 评论(0) 推荐(0) 编辑

验证控件
摘要:验证控件 RequiredFieldValidator检查必填项是否填入数值 CompareValidator 将输入值与另一个值进行比较 RangeValidator 检查输入值是否在范围内 RegularExpressionValidator用正则表达式匹配 CustomValidator 自定义验证代码 ValidationSummary 显示页面上所有其他验证控件生成的所有错误的概括描述 ... 阅读全文

posted @ 2008-10-27 21:30 Edward Xie 阅读(335) 评论(0) 推荐(0) 编辑

母板页
摘要:母版页 . . . . . . 1、@Page 标记中指定 MasterPageFile 位置 2、去除内容页的多余 html 标签 3、去除 form 标记 4、创建标签,并放入对应的内容 5、指定相应的ContentPlaceHolderID 内容页 阅读全文

posted @ 2008-10-25 02:53 Edward Xie 阅读(138) 评论(0) 推荐(0) 编辑

导航控件
摘要:Web.sitemap for SiteMapPath Aspx文件Exp: Web.xml for TreeView ... 阅读全文

posted @ 2008-10-25 02:45 Edward Xie 阅读(157) 评论(0) 推荐(0) 编辑

基本对象常用方法及属性
摘要:Request对象 QuertString属性 对应get方法附加在url后的数据 Form属性 对应post方法的数据 ServerVariables属性 获取web服务器变量 Exp: Request.ServerVariables["HTTP_USER_AGENT"]; //获取浏览器及版本 Request.ServerVariables["HTTP_ACCEP... 阅读全文

posted @ 2008-10-25 00:41 Edward Xie 阅读(156) 评论(0) 推荐(0) 编辑

1