摘要:1.Create Table TableXml(id int identity(1,1) Primary Key,x xml)GoInsert Into TableXml Select '<root> <Info id="1" name="Name1" City="City1"/> <Info id="2" name="Name2" City="City2"/> <Info id="3" name=&quo
阅读全文
摘要:Using System.Text;byte[ ] 转换为stringbyte[ ] image;string ll = Encoding.Default.GetString(image);string 转换为byte[ ]string ss;byte[] b = Encoding.Default.GetBytes(ss);数据库中image类型的字段的处理。首先我想从数据库中读出图片(以image类型存储的), 并且写入txt文件中:private void GetImage() { string conn = "Server=192.168.0.11; User id=user; Pwd=
阅读全文
摘要:ASP.NET以及JS获取URL和IP地址HttpContext.Current.Request.Url.ToString() 并不可靠。如果当前URL为http://localhost/search.aspx?user=http://csharp.xdowns.com&tag=%BC%BC%CA%F5通过HttpContext.Current.Request.Url.ToString()...
阅读全文
摘要:string fileName = ""; string filePath = Server.MapPath("");//路径 FileInfo fileInfo = new FileInfo(filePath); Response.Clear(); Response.ClearContent(); Response.ClearHeaders(); Response.AddHeader("Cont...
阅读全文
摘要:$(function() {$.ajax({url: "http://****.***.com/***.html?callback=?",dataType: "jsonp",jsonp: 'callback'});}); public ContentResult ***() { int state = 0; if (HttpContext.User.Identity.IsAuthenticate...
阅读全文
摘要:set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgoalter PROCEDURE [dbo].[sp_OrderPagination](@fields varchar(1000) = '*', -- 需要返回的列 @sortField varchar(255)='', -- 排序的字段名, max(字段)或min(字段)字段不重复@pageSize int = ...
阅读全文
摘要:ROW_NUMBER、RANK、DENSE_RANK 和 NTILE,这些新函数使您可以有效地分析数据以及向查询的结果行提供排序值。您可能发现这些新函数有用的典型方案包括:将连续整数分配给结果行,以便进行表示、分页、计分和绘制直方图。 Speaker Statistics 方案下面的 Speaker Statistics 方案将用来讨论和演示不同的函数和它们的子句。大型计算会议包括三个议题:数据库...
阅读全文
摘要:sql server检查临时表是否存在使用中发现 select into 临时表 很麻烦,下面是使用中发现的一些注意事项(一下以mssqlserver为例):1,一般使用create table person (id int ,name varchar(20),birthday datetime) 读取数据到临时表中 select * into #tb_tmp from person where ...
阅读全文
摘要:1.fckeditor 脚本出现unterminated string literal问题的时候,一般就是遇到付给value值有换行情况。 一般对此处理要使用替换方式:return content.Replace("'", "'").Replace("'", """).Replace("\r","\\");或者直接在控件里赋值注意:单引号,双引号,换行符号。换行不是转换\n,而是转换\r2.回转 url ReturnUrl=<
阅读全文
摘要:ISNUMERIC(字段)isnull(字段)cast(字段 as 类型)convert(类型,字段)rownumber() over(order a desc)
阅读全文
摘要:1、加入 <param name="wmode" value="transparent" />2、加入 <embed src="YourFlash.swf" wmode="transparent" ... ></embed>参考http://www.artery.cn/news/WEBbiaozhunhua/2009-06-14/197.html源代码
阅读全文
摘要:1.常用函数function(evt) { var e = (evt) ? evt : window.event; if (window.event) { e.cancelBubble = true; } else { e.stopPropagation(); }阻止事件function(ele, e, call) { if (window.addEventListener) ele.addEventListener(e, call, false); else ele.attachEvent("on" + e, call); }添加事件$("#addClassName").keydown(fu
阅读全文
摘要:1./// <summary> /// 过滤不安全的字符串 /// </summary> /// <param name="Str"></param> /// <returns></returns> public static string FilteSQLStr(string Str) { Str = Str.Replace...
阅读全文
摘要:http://www.planeart.cn/downs/artDialog/ 不依赖其他库http://www.javaeye.com/topic/541141 主题:基于jquery和mini_magick的图片裁剪 http://odyniec.net/projects/imgareaselect/examples-advanced.htmlhttp://www.google.com.hk/...
阅读全文