易截截图软件、单文件、免安装、纯绿色、仅160KB

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())


相关文档:

ASP.NET中防止页面多次提交的代码实现

此处提供的代码用来实现当asp.net页面中的某个Button被点击后disable掉该页面中所有的Button,从而防止提交延时导致的多次提交。基于之前的onceclickbutton脚本.
//ASP.NET中防止页面多次提交的代码:javascript< script language="javascript"> < !-- function disableOtherSubmit() {
var obj = event.srcElem ......

Asp.Net 301重定向的实现(SEO友好,有利于PR值)

网站的重定向,通常用的有 301 和 302,301是永久重定向,是对SEO友好的,有利于保持原域名和新域名之间的PR转移及流量数据等。
Asp.Net 中实现301重定向的代码,也是比较简单的,举个例子:
原来的域名是 www.abc.com, 现在要将对这个域名的访问,全部重定向到 www.zu14.cn;
只需在 需要转向的页面里,
protected void ......

asp.net运行原理


 
主要类:
  System.Web.HttpRuntime
  System.Web.HttpApplicationFactory
  System.Web.HttpApplication
  System.Web.Compilation.BuildManager
  System.Web.Compilation.ApplicationBuildProvider
  System.Web.Compilation.BuildProvidersCompiler
  System.Web.UI.PageHandlerFactory ......

ASP.NET 页生命周期概述

ASP.NET 页生命周期概述
ASP.NET 页运行时,此页将经历一个生命周期,在生命周期中将执行一系列处理步骤。这些步骤包括初始化、实例化控件、还原和维护状态、运行事件处理程序代码以及进行呈现。了解页生命周期非常重要,因为这样做您就能在生命周期的合适阶段编写代码,以达到预期效果。此外,如果您要开发自定义控件,就 ......

asp.net中使用基于角色role的Forms验证

asp.net中使用基于角色role的Forms验证,大致经过几下四步:
1.配置系统web.config
timeout="20" path="/" />
其中 表示本应用程序采用Forms验证方式。
1). 标签中的name表示指定要用于身份验证的 HTTP Cookie。默认情况下,name 的值是 .ASPXAUTH。采用此种方式验证用户后,以此用户的信息建立一个FormsAuthenticati ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号