上一页 1 ··· 3 4 5 6 7

2014年6月8日

C​# ​日​期​时​间

摘要: //获取日期+时间 DateTime.Now.ToString(); // 2008-9-4 20:02:10 DateTime.Now.ToLocalTime().ToString(); // 2008-9-4 20:12:12 //获取日期 DateTime.Now.ToLongDateStri 阅读全文

posted @ 2014-06-08 14:55 lxboy 阅读(150) 评论(0) 推荐(0)

LINQ To SQL && Lambda 使用方法小结 (转)

摘要: 1、 查询Student表中的所有记录的Sname、Ssex和Class列。select sname,ssex,class from studentLinq: from s in Students select new { s.SNAME, s.SSEX, s.CLASS } Lambda: Stu 阅读全文

posted @ 2014-06-08 14:52 lxboy 阅读(571) 评论(0) 推荐(0)

2014年6月5日

在Gridview编辑时添加DropDownList控件并设置默认值

摘要: 页面代码: <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="650px" Font-Size="12px" ForeColor ="#43860c" DataKeyNames="user_i 阅读全文

posted @ 2014-06-05 11:10 lxboy 阅读(856) 评论(0) 推荐(0)

取得GridView某行的DataKey

摘要: 首先绑定DataKeyNames GridView.DataKeyNames = new string[] { "字段名称" }; 取值 string aaa= GridView.DataKeys[e.Row.RowIndex].Value.ToString();1、在绑定时设置主键: //设置主键 阅读全文

posted @ 2014-06-05 09:35 lxboy 阅读(362) 评论(0) 推荐(0)

上一页 1 ··· 3 4 5 6 7

导航