06 2014 档案

Repeater嵌套gridview
摘要:前台:<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1" OnItemDataBound="Repeater1_ItemDataBound"> <ItemTemplate> id:<%#Eval("ID" 阅读全文

posted @ 2014-06-26 12:18 lxboy 阅读(335) 评论(0) 推荐(0)

C#中Dictionary的用法
摘要:在C#中,Dictionary提供快速的基于兼职的元素查找。他的结构是这样的:Dictionary<[key], [value]> ,当你有很多元素的时候可以使用它。它包含在System.Collections.Generic名空间中。在使用前,你必须声明它的键类型和值类型。 在C#中,Dictio 阅读全文

posted @ 2014-06-10 10:36 lxboy 阅读(241) 评论(0) 推荐(1)

C#开发中使用Npoi操作excel实例代码
摘要:Npoi 是什么?1.整个Excel表格叫做工作表:WorkBook(工作薄),包含的叫页(工作表):Sheet;行:Row;单元格Cell。2.Npoi 下载地址:http://npoi.codeplex.com/releases/view/381133.Npoi 学习系列教程推荐:http:// 阅读全文

posted @ 2014-06-09 11:55 lxboy 阅读(1576) 评论(0) 推荐(0)

div定位
摘要:1.float定位带来的问题<html> <head> <title>div浮动引发的问题</title> </head> <style> body{ margin:0px 1px 2px 3px; } #father{ background-color:#FFFF99; width:100%; h 阅读全文

posted @ 2014-06-08 16:13 lxboy 阅读(734) 评论(0) 推荐(0)

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 阅读(151) 评论(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 阅读(572) 评论(0) 推荐(0)

在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 阅读(860) 评论(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 阅读(368) 评论(0) 推荐(0)

导航