上一页 1 ··· 8 9 10 11 12 13 下一页
摘要: 用户控件 继承:System.Web.Mvc.ViewUserControl<Cot.Products> Cot.Products: 范型 Model: 在当前控件可用 Model 取值, 比如 Model.Id (前提 (new Cot.Products()).Id 必须存在) ViewData[] : 可用ViewData["name"]方式取值Web窗体 继承 :System.Web.Mvc.ViewPage<AdminBase> AdminBase:范型 Model: 在当前控件可用 Model 取值, 比如 Model.Id (前提 (ne 阅读全文
posted @ 2011-04-17 14:05 hen 阅读(574) 评论(0) 推荐(1) 编辑
摘要: insert into Print (printChannelStyleId,TemplateResourceID,CreateDate) select a.id, b.id,getdate() from PrintStyle as a,Template as b where a.catalogId in (27,28,29) and b.BindType=a.styleCode 阅读全文
posted @ 2011-04-14 10:47 hen 阅读(333) 评论(0) 推荐(0) 编辑
摘要: SQL Server 2005 的新特性Row_Number()函数语法:ROW_NUMBER() OVER(PARTITION BY COLUMN ORDER BY COLUMN) 例子: select * from ( select *, ROW_NUMBER() OVER(Order by a.CreateTime DESC ) AS RowNumber from table_name as a ) as b where RowNumber BETWEEN 1 and 5将会返回table表其中有一列名字为 RowNumber, 编号从1开始示例: xlh row_num 1700 1 阅读全文
posted @ 2011-04-13 16:27 hen 阅读(2817) 评论(0) 推荐(1) 编辑
摘要: 页面调用(.aspx)<%@ Register Src="~/myspace/UC/Friend_Diary.ascx" TagPrefix="uc" TagName="friend" %><uc:friend runat="server" UserID="3333" />后台调用(.cs)UserControl Member_Friend = (UserControl)LoadControl("UC/Member_Friend.ascx");righ 阅读全文
posted @ 2011-04-13 14:09 hen 阅读(161) 评论(0) 推荐(0) 编辑
摘要: <HeaderTemplate> 元素中的内容在输出中仅出现一次<ItemTemplate> 元素的内容会对应 DataSet 中的 "record" 重复出现<FooterTemplate> 的内容在输出中仅出现一次<AlternatingItemTemplate> 您可以在 <ItemTemplate> 元素后添加 <AlternatingItemTemplate> 元素,这样就可以描述交替行的外观了。<SeparatorTemplate>元素能够用于描述每个记录之间的分隔符。比分隔符直 阅读全文
posted @ 2011-04-13 13:37 hen 阅读(1729) 评论(1) 推荐(1) 编辑
摘要: ?? : 如果"??" 运算符左操作数非空, 返回左操作数,如果"??" 运算符左操作数为空, 或者是没定义的, 则返回右操作数.例子:int a = b ?? 1; //b 未定义 所以等价于 int a=1;string s=null;string sb= s ?? ""; //s为空, 所以等价于 string sb="";string s="我不是null的哦!";string sb=s ?? ""; //s不为空, 所以等价于 string sb="我不是 阅读全文
posted @ 2011-04-13 11:43 hen 阅读(578) 评论(0) 推荐(0) 编辑
摘要: 简单的说 access 神经病的update 时传参数要按顺序传错误:OleDbParameter[] parameters = new OleDbParameter[]{ AccessHelper.Parameter("@name", name) AccessHelper.Parameter("@content", content,OleDbType.LongVarWChar)};正确:OleDbParameter[] parameters = new OleDbParameter[]{ AccessHelper.Parameter("@co 阅读全文
posted @ 2011-04-13 00:10 hen 阅读(554) 评论(0) 推荐(2) 编辑
摘要: 访问类型名称数据库数据类型OLEDB 类型.NET 框架类型成员名称文本VarWCharDBTYPE _ WSTRSystem.StringOleDbType.VarWChar备忘录LongVarWCha RDBTYPE _ WSTRSystem.StringOleDbType.LongVarWChar字节数:UnsignedTinyIntDBTYPE _ UI 1System.ByteOleDbType.UnsignedTinyInt是 / 否BooleanDBTYPE_BOOLSystem.BooleanOleDbType.Boolean日期 / 时间DateTimeDBTYPE _ DA 阅读全文
posted @ 2011-04-12 23:32 hen 阅读(5622) 评论(0) 推荐(2) 编辑
摘要: .Split (char) : 按固定字符分割函数string[] listSideContent = sideContent.Split(','); 阅读全文
posted @ 2011-04-11 22:04 hen 阅读(211) 评论(0) 推荐(0) 编辑
摘要: //引用命名空间using System.Drawing.Imaging;using System.Drawing;using System.Drawing.Drawing2D;#region GetPicThumbnail /// <summary> /// 无损压缩图片 /// </summary> /// <param name="sFile">原图片</param> /// <param name="dFile">压缩后保存位置</param> /// <param n 阅读全文
posted @ 2011-04-07 09:30 hen 阅读(24939) 评论(19) 推荐(5) 编辑
摘要: Convert : 内容转换函数举例: Convert.ToInt32() 可以将多种类型(包括 object 引用类型)的值转换为 int 类型,因为它有许多重载版本[2]: public static int ToInt32(object); public static int ToInt32(bool); public static int ToInt32(byte); public static int ToInt32(char); public static int ToInt32(decimal); public static int ToInt32(double); public 阅读全文
posted @ 2011-04-07 09:01 hen 阅读(755) 评论(0) 推荐(0) 编辑
摘要: 1.使用传统的Response.Redirect例如string url = "/account/create";Response.Redirect(url);1.Server.Transfer方法: Server.Transfer("m2.aspx");//页面转向(服务器上执行)。服务器停止解析本页,保存此页转向前的数据后,再使页面转向到m2.aspx, 并将转向前数据加上m2.aspx页结果返回给浏览器。 2.Server.Execute方法: Server.Execute("m2.aspx"); 服务器保存此页转向前的数据后, 阅读全文
posted @ 2011-04-02 23:57 hen 阅读(21203) 评论(0) 推荐(3) 编辑
摘要: public ActionResult Temp() { return Content("Hi there!"); } 阅读全文
posted @ 2011-04-02 22:45 hen 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 定义 RegExpRegExp 对象用于存储检索模式。通过 new 关键词来定义 RegExp 对象。以下代码定义了名为 patt1 的 RegExp 对象,其模式是 "e":var patt1=new RegExp("e");功能 : 寻找的是字符 "e".或者使用正则表单式:var reg =new RegExp(/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/);功能 : 寻找匹配.test()test() 方法检索字符串中的指定值。返回值是 t 阅读全文
posted @ 2011-04-02 17:43 hen 阅读(337) 评论(0) 推荐(0) 编辑
摘要: 定义数组数组对象用来在单独的变量名中存储一系列的值。我们使用关键词 new 来创建数组对象。下面的代码定义了一个名为 myArray 的数组对象:var myArray=new Array()有两种向数组赋值的方法(你可以添加任意多的值,就像你可以定义你需要的任意多的变量一样)。1:var mycars=new Array()mycars[0]="Saab"mycars[1]="Volvo"mycars[2]="BMW"也可以使用一个整数自变量来控制数组的容量:var mycars=new Array(3)mycars[0]=&quo 阅读全文
posted @ 2011-04-02 16:35 hen 阅读(290) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 下一页