摘要: 事件源对象 event.srcElement.tagName event.srcElement.type 捕获释放 event.srcElement.setCapture();event.srcElement.releaseCapture(); 事件按键 event.keyCode event.shiftKey event.altKey event.ctrlKey 事件返回值 event.returnValue 鼠标位置 event.x event.y 窗体活动元素 document.activeElement 绑定事件 document.captureEvents(Event.KEYDOW. 阅读全文
posted @ 2012-03-21 16:17 colyn 阅读(884) 评论(1) 推荐(1) 编辑
摘要: 1、取不重复的工资信息 Select distinct salary from table1 注:distinct是对整个结果集进行重复处理的,而不是针对每一个列。 如distinct后有多列,则是针对多列,不是单列 例:select distinct salary,sName from table12、在表中新加一列 alter table table1 add colum varchar(20) null;3、Union select name,password from table1 union select name,password from table2 注:union前后两个s. 阅读全文
posted @ 2012-02-21 21:10 colyn 阅读(406) 评论(0) 推荐(0) 编辑
摘要: Sql常用语法下列语句部分是Mssql语句,不可以在access中使用。SQL分类: DDL—数据定义语言(CREATE,ALTER,DROP,DECLARE) DML—数据操纵语言(SELECT,DELETE,UPDATE,INSERT) DCL—数据控制语言(GRANT,REVOKE,COMMIT,ROLLBACK) 首先,简要介绍基础语句:1、说明:创建数据库CREATE DATABASE database-name 2、说明:删除数据库drop database dbname 3、说明:备份sql server--- 创建 备份数据的 deviceUSE masterEXEC sp_a 阅读全文
posted @ 2012-02-21 13:39 colyn 阅读(295) 评论(0) 推荐(0) 编辑
摘要: ado.net提供了丰富的数据库操作,在这些操作中SqlConnection和SqlCommand类是必须使用的,但接下来可以分为两类操作: 一类是用SqlDataReader直接一行一行的读取数据库。第二类是SqlDataAdapter联合DataSet来读取数据。两者比较:SqlDataReader由于是直接访问数据库,所以效率较高。但使用起来不方便。SqlDataAdapter可以把数据库的数据缓存在内存中,以数据集的方式进行填充。这种方式使用起来更方,便简单。但性能较第一种稍微差一点。(在一般的情况下两者的性能可以忽略不计。)先看一个比较简单的代码:简单的入门代码一Code highl 阅读全文
posted @ 2011-12-27 14:28 colyn 阅读(1078) 评论(0) 推荐(0) 编辑
摘要: <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" CssClass="tablecss"> <Columns> <asp:TemplateField HeaderText="编号" HeaderStyle-CssClass="aaa" ItemStyle-CssClass="bbb"> <ItemTemplate> 阅读全文
posted @ 2011-12-20 16:05 colyn 阅读(223) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 将指定字符串按指定长度进行剪切, /// </summary> /// <param name= "oldStr "> 需要截断的字符串 </param> /// <param name= "maxLength "> 字符串的最大长度 </param> /// <param name= "endWith "> 超过长度的后缀 </param> /// <returns> 如果超过长度,返回截断 阅读全文
posted @ 2011-12-20 15:30 colyn 阅读(279) 评论(0) 推荐(0) 编辑
摘要: URL 重写是截取传入 Web 请求并自动将请求重定向到其他 URL 的过程。 比如浏览器发来请求hostname/101.aspx ,服务器自动将这个请求中定向为http://hostname/list.aspx?id=101。url重写的优点在于: 缩短url,隐藏实际路径提高安全性 易于用户记忆和键入。 易于被搜索引擎收录二 实现url重写的基本方法 下载MS的URLRewriter.dll,放到你的web程序的bin下下载地址1:http://www.rickel.cn/uploads/DevTools/MSDNURLRewriting.msi下载地址2:download.micro. 阅读全文
posted @ 2011-12-20 11:21 colyn 阅读(260) 评论(1) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Configuration;using System.Data.SqlClient;using System.Data;using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Configuration;using System.Data.SqlClient;using S. 阅读全文
posted @ 2011-12-20 10:32 colyn 阅读(981) 评论(0) 推荐(0) 编辑
摘要: 1、源错误:[没有相关的源行]源文件: c:\winnt\microsoft.net\framework\v1.0.3705\Config\machine.config 行: 0-------------------------------------------------------------------------------- 版本信息: Microsoft .NET 框架版本:1.0.3705.0; ASP.NET 版本:1.0.3705.0解决方法:重装iis 在命令行输入:aspnet_regiis -r2、Server Application Unavailable The 阅读全文
posted @ 2011-12-20 09:20 colyn 阅读(161) 评论(0) 推荐(0) 编辑
摘要: inner join,full outer join,left join,right jion内部连接 inner join 两表都满足的组合full outer 全连 两表相同的组合在一起,A表有,B表没有的数据(显示为null),同样B表有A表没有的显示为(null)A表 left join B表 左连,以A表为基础,A表的全部数据,B表有的组合。没有的为nullA表 right join B表 右连,以B表为基础,B表的全部数据,A表的有的组合。没有的为null查询分析器中执行:--建表table1,table2:create table table1(id int,name varch 阅读全文
posted @ 2011-12-19 17:13 colyn 阅读(173) 评论(0) 推荐(0) 编辑