摘要: string Ip = string.Empty; Ip = Page.Request.UserHostAddress.ToString();注意:要布置到服务器上,后验证,否则,在本地调试,一直是127.0.0.1 阅读全文
posted @ 2012-10-08 21:25 惊奇的野鹤 阅读(150) 评论(0) 推荐(0)
摘要: checkboxlist绑定数据方法1.把数据绑定到CheckBoxList中特别要注意加载顺序protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { SqlConnection con = GetDBCon.GetCon(); con.Open(); SqlDataAdapter sda = new SqlDataAdapter("select * from admin", con); DataSet ds = new DataSet(); sda.Fill(ds,&qu 阅读全文
posted @ 2012-10-08 18:59 惊奇的野鹤 阅读(471) 评论(0) 推荐(0)
摘要: DateTime 类型:DateTime dt = DateTime.Now;//获取当前时间 int h = dt.Hour;//获取小时 int m = dt.Minute;//获取分钟 int s = dt.Second;//获取秒钟 Console.WriteLine("{0}时{1}分{2}秒!", h.ToString(), m.ToString(), s.ToString()); Console.Read(); string类型:string ss = "0小时... 阅读全文
posted @ 2012-10-08 09:03 惊奇的野鹤 阅读(204) 评论(0) 推荐(0)