07 2010 档案
摘要:String date1 = txtdate1.Value; String date2 = txtdate2.Value; if (DateTime.Parse(date1.Replace("-", "/")) > DateTime.Parse(date2.Replace("-", "/"))) { String temp = date1; date1 = date2; date2 = te...
阅读全文
摘要:创建数据库 创建之前判断该数据库是否存在 if exists (select * from sysdatabases where name='databaseName') drop database databaseName go Create DATABASE database-name 删除数据库 drop database dbname 备份sql server ---...
阅读全文
摘要:<script language="javascript" type="text/javascript">function openwin(){window.open("firstPage/Registration.aspx","","width=700,height=620,top=0,left=0,Location=yes,Toolbar=yes,Resizable=yes,scr...
阅读全文
摘要:<html><head><script language="javascript">function clear(){Source=document.body.firstChild.data;document.open();document.close();document.title="cccccc";document.body.innerHTML=Sourc...
阅读全文
摘要:用的时候记不住,写下来,DateTime dt = DateTime.Now;Label1.Text = dt.ToString();//2005-11-5 13:21:25Label2.Text = dt.ToFileTime().ToString();//127756416859912816Label3.Text = dt.ToFileTimeUtc().ToString();//127756...
阅读全文
摘要:protected void Page_Error(object sender, EventArgs e) { Exception ex = Server.GetLastError(); if (HttpContext.Current.Server.GetLastError() is HttpRequestValidationException) { HttpContext.Current.Res...
阅读全文
摘要:考虑到用com组件太慢,用xml是最佳实践private void ToExcel(String FileName) { //要转换的XML文件 DataSet dsBook = new DataSet(); dsBook = new Select().Select_(); int rows = dsBook.Tables[0].Rows.Count + 1; int cols = dsBook....
阅读全文
摘要://显示标头 Response.AddHeader("Content-Disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("文件名", System.Text.Encoding.UTF8) + ".xls");//这样的话,可以设置文件名为中文,且文件名不会乱码。其实就是将汉字转换成UTF8
阅读全文
浙公网安备 33010602011771号