小技巧
---恢复内容开始---
<meta http-equiv="refresh" content="5">添加这个网页就能每隔5秒刷新一次。
sql里面判空 不为null
is not null
不为""
c.xEmail <>''
MVC中富文本编辑器安全
<pages validateRequest="false"> <namespaces> <add namespace="System.Web.Helpers" /> <add namespace="System.Web.Mvc" /> <add namespace="System.Web.Mvc.Ajax" /> <add namespace="System.Web.Mvc.Html" /> <add namespace="System.Web.Routing" /> <add namespace="System.Web.WebPages" /> </namespaces> </pages> <httpRuntime requestValidationMode="2.0" /> [HttpPost] [ValidateInput(false)] public ActionResult Edit() { 三处加下就可以了
当数据库ID为自增主键插入已经删除主键时
set identity_insert region_info on
再写插入的,最好set identity_insert region_info off
---恢复内容结束---
<meta http-equiv="refresh" content="5">添加这个网页就能每隔5秒刷新一次。
sql里面判空 不为null
is not null
不为""
c.xEmail <>''
MVC中富文本编辑器安全
<pages validateRequest="false"> <namespaces> <add namespace="System.Web.Helpers" /> <add namespace="System.Web.Mvc" /> <add namespace="System.Web.Mvc.Ajax" /> <add namespace="System.Web.Mvc.Html" /> <add namespace="System.Web.Routing" /> <add namespace="System.Web.WebPages" /> </namespaces> </pages> <httpRuntime requestValidationMode="2.0" /> [HttpPost] [ValidateInput(false)] public ActionResult Edit() { 三处加下就可以了
当数据库ID为自增主键插入已经删除主键时
set identity_insert region_info on
再写插入的,最好set identity_insert region_info off
mvc2里面实体校验需在view加上 @{Html.EnableClientValidation()}
行列转换
select *,RowNumber from (select *, ROW_NUMBER() OVER(order by a.ContentID) as RowNumber from (select ContentID, [KeyWord] = stuff((select ' ' + [KeyWord] from AutoKeyWord t where ContentID =AutoKeyWord.ContentID for xml path('')) , 1 , 1 , ''),IsFull from AutoKeyWord group by ContentID,IsFull) as a) as b