小成博客

2010年到了...
  首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2007年7月4日

摘要: ★文本赋值Label1.Text = "字符串";-----------------------------------------------------------------------------------★定义变量string username1 = "";-----------------------------------------------------------------... 阅读全文

posted @ 2007-07-04 22:59 成斌 阅读(180) 评论(0) 推荐(0)

摘要: SqlConnection myConnection = new SqlConnection(SqlConn.Connection);myConnection.Open();SqlDataAdapter myCommand = new SqlDataAdapter();myCommand.SelectCommand = new SqlCommand();myCommand.SelectComman... 阅读全文

posted @ 2007-07-04 22:52 成斌 阅读(151) 评论(0) 推荐(0)

摘要: SqlConnection myConnection = new SqlConnection(SqlConn.Connection); //连接数据库myConnection.Open();SqlDataAdapter myCommand = new SqlDataAdapter(); //执行存储过程myCommand.SelectCommand = new SqlCommand();myCom... 阅读全文

posted @ 2007-07-04 22:51 成斌 阅读(251) 评论(0) 推荐(0)

摘要: SqlConnection myConnection = new SqlConnection(SqlConn.Connection); myConnection.Open(); SqlDataAdapter myCommand = new SqlDataAdapter(); myCommand.SelectCommand = new Sql... 阅读全文

posted @ 2007-07-04 22:47 成斌 阅读(154) 评论(0) 推荐(0)

摘要: SqlConnection myConnection = new SqlConnection(SqlConn.Connection);SqlCommand SqlCommand2 = new SqlCommand("GradeId", myConnection);SqlCommand2.CommandType = CommandType.StoredProcedure;SqlCommand2.Pa... 阅读全文

posted @ 2007-07-04 22:40 成斌 阅读(200) 评论(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.Web.UI.We... 阅读全文

posted @ 2007-07-04 22:35 成斌 阅读(832) 评论(0) 推荐(0)

摘要: 摘要: 本文论述了各种模式的线程(单线程、单元线程和自由线程)以及每种模式的使用方法。同时,还提供了一个使用线程的 C# 语言代码示例,以帮助您编写使用线程的应用程序。本文还讨论了多线程代码中的一些重要问题。 简介 编写多线程 Microsoft® 消息队列 (MSMQ) 触发器应用程序向来是一件让人畏惧的事情。不过,.NET 框架线程和消息类的出现使这项工作变得比以前容易了。这些类允许您... 阅读全文

posted @ 2007-07-04 22:33 成斌 阅读(1012) 评论(0) 推荐(0)

摘要: if(fileupload.PostedFile!=null) { //addto为要添加的属性,aboutfile为文件说明 string nam = fileupload.PostedFile.FileName ; //取得文件名(抱括路径)里最后一个"."的索引 int i= nam.LastIndexOf("."); //... 阅读全文

posted @ 2007-07-04 22:31 成斌 阅读(230) 评论(0) 推荐(0)

摘要: string key = TextBox1.Text; //用户名文本框设为cache关键字 string uer = Convert.ToString(Cache[key]); //读取cache中用户相应的值//判断cache中是否有用户的信息,如果没有相关的值,说明用户未登陆if (uer == null || uer == String.Empty){ //定义cache过期时间 Time... 阅读全文

posted @ 2007-07-04 22:29 成斌 阅读(616) 评论(3) 推荐(0)

摘要: 阅读全文

posted @ 2007-07-04 22:26 成斌 阅读(212) 评论(0) 推荐(0)

摘要: 客户端ip:Request.ServerVariables.Get("Remote_Addr").ToString();客户端主机名:Request.ServerVariables.Get("Remote_Host").ToString();客户端浏览器IE:Request.Browser.Browser;客户端浏览器 版本号:Request.Browser.MajorVersion;客户端操作系... 阅读全文

posted @ 2007-07-04 22:17 成斌 阅读(13558) 评论(0) 推荐(1)

摘要: 分页方案一:(利用ID大于多少和SELECT TOP分页)示例: SELECT TOP 10 *FROM TestTableWHERE (ID >= (SELECT MAX(id) FROM (SELECT TOP 20 id FROM TestTable ORDER BY id) AS T))ORD... 阅读全文

posted @ 2007-07-04 14:24 成斌 阅读(129) 评论(0) 推荐(0)

摘要: declare @a int,@b intset @a=1set @b=1while @a<100000begin insert into test_table (news_title,news_content) values(@a,@b) set @a=@a+1 set @b=(@a+1)*5-2end 阅读全文

posted @ 2007-07-04 13:06 成斌 阅读(524) 评论(0) 推荐(0)

摘要: select * from test_table where id in (select top 100 id from test_table )and news_title like '%1%' 阅读全文

posted @ 2007-07-04 12:57 成斌 阅读(92) 评论(0) 推荐(0)

摘要: DECLARE @d datetimeSET @d=getdate()--SQL语句select datediff(ms,@d,getdate()) AS '执行时间' 阅读全文

posted @ 2007-07-04 12:48 成斌 阅读(179) 评论(0) 推荐(0)

摘要: 欢迎诸位多多捧场! 阅读全文

posted @ 2007-07-04 09:31 成斌 阅读(145) 评论(0) 推荐(0)