摘要: View Code 查询:select *From 表名where 条件 select ...,...from 表名1,表名2where 插入:INSERT INTO 表名(学号,姓名,性别...................)Values (常量1,..............,常量n)INSERT INTO 表名select 列名1...............列名nfrom 表名1where条件 修改:UPDATE 表SET 列名1=表达式1; 列名2=表达式2;weher 条件 删除:DELETEfrom 表where 条件 阅读全文
posted @ 2012-06-21 16:24 ComBat 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 静态:select * from uselist(表) where 姓名=" 李四" ;动态:select * from uselist(表)where 姓名="+xm+"技巧:先写个原句列子aa,再把aa删除,加双引号,空格,然后"+xm+" 阅读全文
posted @ 2012-06-21 16:23 ComBat 阅读(147) 评论(0) 推荐(0) 编辑
摘要: View Code 数据库连接 八步SQL: using System.Date.SqlClient;ACCESS: using System.Date.OLeDb;======================== 1.创建连接对象SqlConnection 连接对象名称=new SqlConnection();OleDbConnection 连接对象名称=new OledbConnection();2.设置连接字符串连接对象名称.ConnectionString="...连接字符串..."; 字符串:Access:provider=microsoft.Jet... 阅读全文
posted @ 2012-06-21 16:22 ComBat 阅读(115) 评论(0) 推荐(0) 编辑
摘要: View Code public class GetCode{ public static int code() { Random random = new Random(); int num1 = random.Next(0, 9); int num2 = random.Next(0, 9); int num3 = random.Next(0, 9); int num4 = random.Next(1, 9); int result = num1 + num2 * 10 + num3 * 100 ... 阅读全文
posted @ 2012-06-21 14:21 ComBat 阅读(150) 评论(0) 推荐(0) 编辑
摘要: View Code 用控件进行快速开发笔记Anchor属性:控件会随着窗体拖拽而变大缩小Dock属性:向Dock属性制定的方向停靠单文档应用程序 SDI多文档应用程序 MDI创建MID窗体程序的步骤1.设置父窗体(设置窗体Form的IsMDIContainer为true)2.创建子窗体的对象3.设置子窗体的父窗体 (子窗体.MDIParent)4.调用Show()方法(子窗体.Show())MDI子窗体排列方式层叠(Cascade)水平(TileHorizontal)垂直(TileVertical)最小化(ArrangeIcons)例如: this.LayoutMdi(MdiLayout.Ca 阅读全文
posted @ 2012-06-21 13:32 ComBat 阅读(101) 评论(0) 推荐(0) 编辑
摘要: View Code <table> <p> <a href= "# " id= "javascript.a "> <img src= "images/cuxiao3.jpg" width= "500 " height= "245 " border= "0 " id= "javascript.img " style= "FILTER:blendTrans(duration=2) "alt=&quo 阅读全文
posted @ 2012-06-21 13:22 ComBat 阅读(127) 评论(0) 推荐(0) 编辑
摘要: View Code function DoCheck(name, flag) { //获取所有HTML标记name为该参数的元素,返回是一个数组 var cbID = document.getElementsByName(name); for (var i = 0; i < cbID.length; i++) { if (cbID[i].type == "checkbox")//判断是否为复选框 { if (flag) { cbID[i].checked = flag; } ... 阅读全文
posted @ 2012-06-21 13:21 ComBat 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Page.ClientScript.RegisterStartupScript(this.GetType(), "msg", "alert('未选择任何数据!');", true);————————————————————————————RowDataBound光棒 if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes.Add("OnMouseOver", "Color=this.style.backgroundColor;th 阅读全文
posted @ 2012-06-21 13:18 ComBat 阅读(193) 评论(0) 推荐(0) 编辑
摘要: View Code 所用到的类:TOHTML.cs————————————————————using System;using System.Collections.Generic;using System.Web;using System.IO;using System.Data;using System.Text;/// <summary>///TOHTML 的摘要说明/// </summary>public class TOHTML{ /// <summary> /// 读取htm文件内容 /// </summary> /// <pa 阅读全文
posted @ 2012-06-21 11:44 ComBat 阅读(402) 评论(0) 推荐(0) 编辑
摘要: View Code void Application_BeginRequest(object sender, EventArgs e) { //1 Regex reg = new Regex(@"news_show(\d+).html");//访问静态网址 if (reg.Match(HttpContext.Current.Request.Url.AbsolutePath).Success)//是否匹配 { string id = reg.Match(HttpContext.Current.Request.Ur... 阅读全文
posted @ 2012-06-21 11:42 ComBat 阅读(1094) 评论(0) 推荐(0) 编辑