小成博客

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

文章分类 -  C# Web Form

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

posted @ 2007-07-04 22:59 成斌

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

posted @ 2007-07-04 22:52 成斌 阅读(154) 评论(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 成斌 阅读(254) 评论(0) 推荐(0)

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

posted @ 2007-07-04 22:47 成斌 阅读(156) 评论(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 成斌 阅读(201) 评论(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 成斌 阅读(834) 评论(0) 推荐(0)

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

posted @ 2007-07-04 22:31 成斌 阅读(231) 评论(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 成斌 阅读(623) 评论(3) 推荐(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 成斌 阅读(13562) 评论(0) 推荐(1)