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())
相关文档:
前几篇文章介绍了几个国外的.NET CMS,今天就介绍一下国内在ASP.NET平台中比较有特色的pageadmin cms(网址:http://www.pageadmin.net),这个系统并未走传统标签+HTML的路线,直接采用可视化的div+css组合功能模块的设计,大大提供了系统的易用性,下面介绍一下这个系统:
PageAdmin网站内 ......
1. 当不需要使用Session的时候请关闭
关闭Session当不需要使用的时候
• 若要禁用页的会话状态,请将@ Page 指令中的EnableSessionState 属性设置为false。例如, <%@ Page EnableSessionState="false" %>。
• 注意如果页需要访问会话变量,但不打算创建或修改它们,则将 ......
ASP.NET实现在线播放FLV视频件的代码
前台调用代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1&q ......
ASP.NET 页生命周期概述
ASP.NET 页运行时,此页将经历一个生命周期,在生命周期中将执行一系列处理步骤。这些步骤包括初始化、实例化控件、还原和维护状态、运行事件处理程序代码以及进行呈现。了解页生命周期非常重要,因为这样做您就能在生命周期的合适阶段编写代码,以达到预期效果。此外,如果您要开发自定义控件,就 ......
先建个html模版页(template.htm):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>$title</title>
</head>
&l ......