08 2008 档案
excel导入数据库的代码
摘要:excel导入数据库的代码 try { OleDbDataReader dr1 = OAConfig1.MyReaderexcel("/source_file.xls","00",3,"SELECT * FROM [空间$]"); if(dr1.R...
阅读全文
JavaScript
摘要:var b = isNaN(document.getElementById("txtCoursesTime").value); if(b) { alert("请在课程学时输入数字!"); return false; } 事件:onMouseOver="可以是方法hello()" target="_bla...
阅读全文
.net中的正则
摘要:去掉HTML字符:System.Text.RegularExpressions.Regex.Replace(HTMLStr, "]*>", ""); o.innerHTML=o.innerHTML.replace(/(\/]*)\/?>/gi,''); o.innerHTML=o.innerHTML.replace(/(\/]*)\/?>/gi,''); if(e.width > 180 || ...
阅读全文
SQL
摘要:select t.id,t.name,(case when u.dt is null then t.dt else u.dt end)as updatedt from testta t left join (select id,max(dt) as dt from updatedate group by id) as u on t.id=u.id dt是时间 删除列:alter table te...
阅读全文
.NET 中部分常用的 CSS
摘要:压缩图片:img { max-width: 500px; width:expression(this.width > 500 ? "500px" : this.width);} 用表格做网页排版的时候,一般都能正常使用。偏偏有时会碰到一段连续的英文词或者一堆感叹号(!!!)把网页就撑开的现象:( 总结了一下,只要在CSS中定义了如下句子,可保网页不会再被撑开了。 table{table-la...
阅读全文
.net常用的部分
摘要:删除按钮的提示: if (e.Item.ItemType==ListItemType.Item || e.Item.ItemType==ListItemType.AlternatingItem) { Button btnDele = (Button)e.Item.Cells[9].Controls[1]; btnDele.Attributes.Add("onclick","javascript...
阅读全文