在repeater绑定数据的<td>上加上如下的样式即可比如,避免数字太长下载到excel后显示为科学计数时,需要在绑定数据的行加上文本样式: <td style="vnd.ms-excel.numberformat:@"> <%#Eval("ID") %></td>//1) 文本:vnd.ms-excel.numberformat:@//2) 日期:vnd.ms-excel.numberformat:yyyy/mm/dd//3) 数字:vnd.ms-excel.numberformat:#,##0.00/ Read More
posted @ 2013-01-24 16:15 dahouhou Views(137) Comments(0) Diggs(0) Edit
1.定义一个实体变量 varticket={TicketNo:$("#TicketNo").val(),SeatNo:$("#SeatNo").val()};2.读取页面上已经选中的数据项(数据绑定的checkbox上)vargetData=function(){varrows=document.getElementById("RepeaterName").rows;varrow,i;vardatas=[];for(i=1;row=rows[i];i++){varchk=row.cells[0].getElementsByTagNam Read More
posted @ 2012-03-21 17:07 dahouhou Views(169) Comments(0) Diggs(0) Edit
轉自柳永法(yongfa365)'Bloghttp://www.yongfa365.com/Item/Repeater-Parent-Container-DataBinder-Eval.html1.子级Repeater中绑定父级Repeater的某个字段: 方法1:<%#DataBinder.Eval((Container.NamingContainer.NamingContainerasRepeaterItem).DataItem,"PropertyName")%>方法2:<%#DataBinder.Eval((Container.Parent. Read More
posted @ 2012-03-15 10:19 dahouhou Views(303) Comments(0) Diggs(0) Edit
示例:构造表 CREATE TABLE [dbo].[学生表]([Sno] [int] NULL,[Sname] [Nvarchar](10) NULL,[Ssex] [Nvarchar](2) NULL,[Sage] [int] NULL,[sdept] [Nvarchar](20) NULL) ON [PRIMARY]INSERT INTO dbo.学生表 VALUES ( 1, N'赵一',N'女',19,N'理学院' )INSERT INTO dbo.学生表 VALUES ( 2, N'钱二',N'男',2 Read More
posted @ 2012-02-08 18:09 dahouhou Views(266) Comments(0) Diggs(0) Edit
DateTime dt = DateTime.Now;Label1.Text = dt.ToString();//2005-11-5 13:21:25Label2.Text = dt.ToFileTime().ToString();//127756416859912816Label3.Text = dt.ToFileTimeUtc().ToString();//127756704859912816Label4.Text = dt.ToLocalTime().ToString();//2005-11-5 21:21:25Label5.Text = dt.ToLongDateString().To Read More
posted @ 2012-02-08 16:35 dahouhou Views(147) Comments(1) Diggs(0) Edit
Generic.dx!zka,最近电脑染了这个毒,系统还原后,Mcfee杀毒竟然发现D盘E盘的所有文件都被感染。域服务器自动将染毒文件全部删除,于是俺的文件们..... Read More
posted @ 2011-07-06 16:40 dahouhou Views(192) Comments(0) Diggs(0) Edit
1. 查询某个字符串中“,”(或其他符号,以第一次出现的为准)后面的字符串 select left('1233,abdc',Charindex(',','1233,abdc')-1) number ,substring('1233,abdc',CHARINDEX(',','1233,abdc')+1,600) lettle 执行结果: 2.将某个字符串以“,”(或其他符号)分隔为单独的字符串declare @SplitStringsTable TABLE([value] varchar(8000) Read More
posted @ 2011-07-01 15:26 dahouhou Views(196) Comments(0) Diggs(1) Edit
1.将string转换为int(或float) var s = "12"; s+1;==>输出121 parseInt(s)+ 1; ==>输出13( parseFloat(s)+ 1; ==>输出13 )2.Js根据现有值(status)控制RadioButtonList 的选中值 varrbl=document.getElementById('XXXXX');varrbls=rbl.getElementsByTagName('input');if(status ==1)rbls[0].checked=true;if(st Read More
posted @ 2011-06-24 11:16 dahouhou Views(153) Comments(0) Diggs(0) Edit