ASP.NET按时间查询
select top 6 * from ViewHouseSale where 1=1 and (EstateType='0' or EstateType='1')
and DateDiff(day,PubDate,getdate()) <=7 and IfBenefit='Y' and IfValid='Y' order by PubDate DESC
select top 6 * from ViewHouseSale where 1=1 and (EstateType='0' or EstateType='1')
PubDate between 23:59:59' and 23:59:59' and IfBenefit='Y' and IfValid='Y' order by PubDate DESC
--当天
(usrRegTime >=CONVERT(varchar(10),getDate(),120)+' 00:00:00' and usrRegTime <=CONVERT(varchar (10),getDate(),120)+' 23:59:59')
--近三天
DateDiff(day,usrRegTime,getdate()) <=3
--本周
Datepart(year,usrRegTime)=DatePart(year,Getdate()) and DatePart(week,usrRegTime)=DatePart (week,GetDate())
--本月
Datepart(year,usrRegTime)=DatePart(year,Getdate()) and DatePart(month,usrRegTime)=DatePart (month,GetDate())
相关文档:
1、 response.redirect 这个跳转页面的方法跳转的速度不快,因为它要走2个来回(2次postback),但他可以跳 转到任何页面,没有站点页面限制(即可以由雅虎跳到新浪),同时不能跳过登录保护。但速度慢是其最大缺陷!redirect跳转机制:首先是发送一个http请求到客户端,通知需要跳转到新页面,然后客户端在发送跳转请求到服务器 ......
ASP.NET程序中常用的三十三种代码
1. 打开新的窗口并传送参数:
传送参数:
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>")
接收参数:
string a = Request.QueryString("id");
string& ......
//连接数据库
string myStr = CODE.DbHelperSQL.connectionString;
SqlConnection myConn = new SqlConnection(myStr);
myConn.Open();
&nbs ......
asp.net ajax学习笔记
一、 登堂入室——基本概念
http://blog.csdn.net/soldierluo/archive/2009/11/18/4830758.aspx
二、 小试身手——第一个Ajax程序
http://bl ......