摘要: 建一个表 t_hoteladvertise 有如下字段:ID 自动增长(主要)SortID INT (主要)Title NVARCHAR(50) 代码: CREATE proc sp_ehotel_DownAdvertise@ID INTasDECLARE @SortID intDECLARE @TempSortID INTDECLARE @TempID INTBEGIN TRANSELECT @SortID=SortID from t_hoteladvertise where [ID]=@IDSELECT @TempSortID=max(SortID) from t_hoteladverti 阅读全文
posted @ 2011-09-09 22:59 microsoftzhcn 阅读(235) 评论(0) 推荐(0)
摘要: 1、DateTime 数字型以下是引用片段:System.DateTime currentTime=new System.DateTime();1.1 取当前年月日时分秒 currentTime=System.DateTime.Now;1.2 取当前年 int 年=currentTime.Year;1.3 取当前月 int 月=currentTime.Month; 软件开发网1.4 取当前日 int 日=currentTime.Day;1.5 取当前时 int 时=currentTime.Hour; 1.6 取当前分 int 分=currentTime.Minute;1.7 取当前秒 int 阅读全文
posted @ 2011-09-09 22:55 microsoftzhcn 阅读(224) 评论(0) 推荐(0)
摘要: 很有用的页面间传值方法(Context.Handler),使用说明一、目前在ASP.NET中页面传值共有这么几种方式: 1、表单提交, <form action= "target.aspx" method = "post" name = "form1"> <input name = "param1" value = "1111"/> <input name = "param2" value = "2222"/> < 阅读全文
posted @ 2011-09-09 22:44 microsoftzhcn 阅读(454) 评论(0) 推荐(0)
摘要: 1.aspx文件:public void SetLabel(string str) { this.Label1.Text = str; ; } ascx文件;protected void Button1_Click(object sender, EventArgs e) { System.Web.UI.Page p = this.Page; Type pageType = p.GetType(); MethodInfo mi = pageType.GetMethod("SetLabel"); mi.Invoke(p, new object[] { "test!!! 阅读全文
posted @ 2011-09-09 22:36 microsoftzhcn 阅读(391) 评论(0) 推荐(0)
摘要: 第一: private void Button1_Click( object sender, System.EventArgs e ) { Response.Redirect( Request.Url.ToString( ) ); } 第二: private void Button2_Click( object sender, System.EventArgs e ) { Response.Write( " <script language=javascript>window.location.href=document.URL; </script>" 阅读全文
posted @ 2011-09-09 22:31 microsoftzhcn 阅读(387) 评论(0) 推荐(0)