随笔分类 -  ASP.NET

摘要:1.Server.MapPath("/") 应用程序根目录所在的位置 如 C:\Inetpub\wwwroot\2.Server.MapPath("./") 表示所在页面的当前目录注:等价于Server.MapPath("") 返回 Server.MapPath("")所在页面的物理文件路径3.Server.MapPath("../")表示上一级目录4.Server.MapPath("~/")表示当前应用级程序的目录,如果是根目录,就是根目录,如果是虚拟目录,就是虚拟目录所在 阅读全文
posted @ 2011-05-05 23:17 翱翔之鹰 阅读(379) 评论(1) 推荐(0)
摘要:1.在你的SQL语句里添加select identity(int,1,1) as 'id', * into #mytemp from YourTable2.在datatable里添加一行DataTable1.Columns.Add("ID",typeof(int));int i=0;foreach (DataRow dr in DataTable1.Rows){ dr["ID"] = ++i;}3. 在模板上添加<%# Container.ItemIndex+1 %>4.利用CSS背景 <ItemTemplate> 阅读全文
posted @ 2011-05-05 23:05 翱翔之鹰 阅读(948) 评论(0) 推荐(0)