上一页 1 ··· 6 7 8 9 10 11 12 下一页
摘要: 收集您的经验之你用什么方法提高.NET网站的性能 比如:尽量用StringBuilder代替使用字符串连接符 “+”.一条足够烂的sql语句就能把你所有的优化工作废掉,数据库优化,这个应该排第一 缓存是所有web架构师的首选优化工具 。这个可以排第二 1。数据库优化。根据实际情况合理设计好数据表。 2。页面缓存。近来减少与数据库之间的连接次数。 3。页面图片不能太大,或者尽... 阅读全文
posted @ 2010-06-25 12:44 奋斗中... 阅读(284) 评论(0) 推荐(0)
摘要: 用URLRewriter进行伪静态配置,webconfig的配置如下:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<?xmlversion="1.0"?><configuration><configSections... 阅读全文
posted @ 2010-06-25 11:42 奋斗中... 阅读(434) 评论(0) 推荐(0)
摘要: cs页面调用代码: public int TotalPage = 0; public int PageCurrent = 1; public int PageSize = 25; public int RowsCount = 0; string userid, username; public DataTable dt = new DataTable(); public string path, ... 阅读全文
posted @ 2010-06-12 18:21 奋斗中... 阅读(760) 评论(1) 推荐(1)
摘要: DateTime相关属性 DateTime 日期=DateTime.Today; //'Today'获取当前日期 Response.Write(日期); //显示2010-1-13 0:00:00 DateTime dt = DateTime.Now; //'Now'获取当前时间包括年月日时分秒 Response.Write(dt.ToString()); //显示2010-1-13 20:36:... 阅读全文
posted @ 2010-06-01 16:31 奋斗中... 阅读(701) 评论(0) 推荐(0)
摘要: Sql Server 中一个非常强大的日期格式化函数 Select CONVERT(varchar(100), GETDATE(), 0): 05 16 2006 10:57AM Select CONVERT(varchar(100), GETDATE(), 1): 05/16/06 Select CONVERT(varchar(100), GETDATE(), 2): 06.05.16 Sele... 阅读全文
posted @ 2010-06-01 11:28 奋斗中... 阅读(227) 评论(0) 推荐(0)
摘要: 此处为跳转,在不出现新页面的情况下:Response.Write("<script language=javascript>alert('提示信息.');window.location='跳转页面'</script>");Response.Write("<script language=javascript>alert('提示信息.'); parent.loca... 阅读全文
posted @ 2010-05-27 11:05 奋斗中... 阅读(491) 评论(0) 推荐(1)
摘要: 想去掉除了段落标记之外的所有html标记,只要页面的文字,好比是我把代码贴到记事本里面的效果,去掉了链接等代码。 可以试试。public static string DelHTML(string Htmlstring)//将HTML去除 { #region //删除样式 Htmlstring = System.Text.RegularExpressions.Regex.Replace(Htmlstring, @"<STYLE>[/s/S]*<\/STYLE>", "", System.Text.RegularExpressions 阅读全文
posted @ 2010-05-27 10:05 奋斗中... 阅读(485) 评论(0) 推荐(0)
摘要: 只能输入数字:"^[0-9]*$" 只能输入n位的数字:"^\d{n}$" 只能输入至少n位的数字:"^\d{n,}$" 只能输入m~n位的数字:"^\d{m,n}$" 只能输入零和非零开头的数字:"^(0|[1-9][0-9]*)$" 只能输入有两位小数的正实数:"^[0-9]+(.[0-9]{2})?$" 只能输入有1~3位小数的正实数:"^[0-9]+(.[0-9]{1,3})?$" 只能输... 阅读全文
posted @ 2010-05-26 14:22 奋斗中... 阅读(166) 评论(0) 推荐(1)
摘要: 验证DropDownList的方法2007-10-26 10:52源代码:protected void Page_Load(object sender, EventArgs e) { SqlConnection conn = Database.connection(); conn.Open(); string strType = "Select * From Type"; SqlDataAdap... 阅读全文
posted @ 2010-05-12 11:53 奋斗中... 阅读(475) 评论(0) 推荐(0)
摘要: 将下面属性设置为True就行了 。AppendDataBoundItems="True" ddlDep.DataTextField = ds.Tables[0].Columns[1].ToString(); ddlDep.DataValueField = ds.Tables[0].Columns[0].ToString(); ddlDep.DataBind() 阅读全文
posted @ 2010-05-12 09:49 奋斗中... 阅读(117) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 下一页