代码改变世界

文章分类 -  asp.net学习笔记

System.Data.DateRow

2009-03-16 18:51 by LvSir, 230 阅读, 收藏,
摘要: DateRow是一个数组,在访问DataRow里的元素时必须使用:DataRow row=Tables["NwebCn"].Select();row[0]["AdminName"]="lyt"; 阅读全文

GridView 的 Footer 如何跨欄置中

2009-02-10 10:04 by LvSir, 490 阅读, 收藏,
摘要: GridView 的 Footer 如何跨欄置中 原來要這樣寫,如果你是在IDE就把 GridView 就產生好,並把 Column 都設定完成。可是在頁面呈現時,在footer 那會出現格線,也就是說,如果有五個 Column ,在footer 那也會有五個 cell ,那看來很奇怪。所以下面這一段code 就可以用上啦 ^^ protected void gvDelv_RowDataB... 阅读全文

在asp.net中使用fckeditor

2009-02-07 17:09 by LvSir, 420 阅读, 收藏,
摘要: Step 1 First step you should take in order to integrate FCKeditor with ASP.NET environment is downloading the FCKeditor .Net package from our dowlnoad site. You can find the latest version of the pac... 阅读全文

asp.net连接数据库(SQL Server 2005 Express)详细说明(http://hi.baidu.com/atmo/blog/item/ef72dc824adbb7be6d811955.html)

2009-02-06 11:27 by LvSir, 1269 阅读, 收藏,
摘要: asp.net连接数据库(SQL Server 2005 Express)详细说明 2007-05-01 03:54 没用过SQL Server 数据库,第一次配置费了不少劲,微软的东西有点绕,能遇到的问题都遇到了,看过此文后,数据库基本都能连接。废话不说。我的系统是xp,不能装SQL Server 2005的企业版本,只能装开发版和Express版,Express是免费版,学习用它就够... 阅读全文

Response.AddHeader使用实例收集

2008-12-18 12:04 by LvSir, 347 阅读, 收藏,
摘要: 文件下载,指定默认名 程序代码 Response.AddHeader("content-type","application/x-msdownload");Response.AddHeader("Content-Disposition","attachment;filename=要下载的文件名.rar"); 刷新页面 程序代码 Response.AddHeader "REFRESH", ... 阅读全文

asp.net中过滤掉非法字符的方法

2008-12-18 08:30 by LvSir, 1931 阅读, 收藏,
摘要: SqlCommand com = new SqlCommand("select count(*) from loginInfo where Name= @name and Pass=@ps", con); com.Parameters.Add(new SqlParameter("@name", SqlDbType.VarChar, 50)); ... 阅读全文

封装md5加密函数

2008-12-11 16:38 by LvSir, 130 阅读, 收藏,
摘要: CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->public string EncryptPassword(string PasswordString,string PasswordFormat ) { if (PasswordFormat="... 阅读全文

asp.net验证邮件正则表达式

2008-12-11 16:17 by LvSir, 189 阅读, 收藏,
摘要: \w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)* 阅读全文

TreeView控件

2008-12-03 21:12 by LvSir, 432 阅读, 收藏,
摘要: TreeView控件介绍 阅读全文

动态加载主题

2008-12-02 22:48 by LvSir, 247 阅读, 收藏,
摘要: 实现动态加载主题的核心是修改Page对象的Theme属性 CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> void Page_PreInit(Object sender, EventArgs e) { if (Req... 阅读全文

指定和禁用主题

2008-12-02 21:46 by LvSir, 643 阅读, 收藏,
摘要: 一:指定主题的方法: 1:为单个页面指定主题,设置@Page指令的Theme或StyleSheetTheme属性,代码如下 2:为这个应用程序指定主题:在web.config文件的配置节中配置如下内容: Theme属性也可以改写成StyleSheetTheme属性 同样一个主题也可以应用于一个给定文件夹中和该文件夹下的所有页面,因此可以将不同的web.config添加到不同的子文夹中... 阅读全文

应用主题

2008-12-02 21:15 by LvSir, 623 阅读, 收藏,
摘要: 应用主题包括: 1:指定和禁用主题 2:动态加载主题 阅读全文

页面事件(Init,Load,PreRender)执行顺序

2008-11-29 20:38 by LvSir, 228 阅读, 收藏,
摘要: Init,Load,PreRender事件执行顺序:1)控件的Init事件2)控件所在页面的Init事件3)控件所在页面的Load事件4)控件的Load事件5)控件所在页面的PreRender事件6)控件的PreRender事件规律:1)Init事件从最里面的控件(包括用户控件及普通控件)向最外面的控件(页面)引发,Load及PreRender等其他事件从最外面的控件向最里面的控件引发;2)控件之... 阅读全文

asp.net学习笔记:母板页和内容页

2008-11-28 00:31 by LvSir, 637 阅读, 收藏,
摘要: 什么是母板页? 母板页是扩展名为.master的asp.net 文件,可以包含静态布局,他包含以下特征: 1:必须包含特殊指令@Master 2:文件第一行代码必须是: 3:默认包含一个容器控件即ContentPlaceHolder控件,他代表内容占位符,由ID属性唯一标志 凡是要和特定母板页绑定的内容页的ContentID必须和母板页的ContentPlaceHoder的 ID相同, 代码: ... 阅读全文