1.最常用的页面跳转(原窗口被替代):Response.Redirect("XXX.aspx");
2.利用url地址打开本地网页或互联网:Respose.Write("<script language='javascript'>window.open('"+ url+"');</script>");
3.原窗口保留再新打开另一个页面(浏览器可能阻止,需要解除):Response.Write("<script>window.open('XXX.aspx','_blank')</script>");
4.效果同1中的另一种写法:Response.Write("<script>window.location='XXX.aspx'</script>");
5.也是原窗口被替代的 (常用于传递session变量的页面跳转):Server.Transfer("XXX.aspx");
6.原窗口保留,以对话框形式打开新窗口:Response.Write("<script>window.showModelessDialog('XXX.aspx')</script>");
7.对话框形式打开新窗口,原窗口被代替:Response.Write("<script>window.showModelDialog('XXX.aspx')</script>");
8.打开简洁窗口:Respose.Write("<script language='javascript'>window.open('"+url+"','','resizable=1,scrollbars=0,status=1,menubar=no,toolbar=no,location=no, menu=no');</script>");
9.利用vs2008端口:System.Diagnostics.Process.Start(http://localhost:3210/系统管理员.aspx);
原文地址:http://www.cnblogs.com/fang8206/archive/2011/09/03/2165529.html
----------------------------------------------------------------------------------------
//获取日期+时间
DateTime.Now.ToString();
DateTime.Now.ToLocalTime().ToString();
//获取日期
DateTime.Now.ToLongDateString().ToString();
DateTime.Now.ToShortDateString().ToString();
DateTime.Now.ToString("yyyy-MM-dd");
DateTime.Now.Date.ToString();
//获取时间
DateTime.Now.ToLongTimeString().ToString();
DateTime.Now.ToShortTimeString().ToString();
DateTime.Now.ToString("hh:mm:ss");
DateTime.Now.TimeOfDay.ToString();
//其他
DateTime.ToFileTime().ToString();
DateTime.Now.ToFileTimeUtc().ToString();
DateTime.Now.ToOADate().ToString();
DateTime.Now.ToUniversalTime().ToString();
DateTime.Now.Year.ToString();
DateTime.Now.Month.ToString();
DateTime.Now.DayOfWeek.ToString(); 获取星期
DateTime.Now.DayOfYear.ToString(); 获取第几天
DateTime.Now.Hour.ToString();
DateTime.Now.Minute.ToString();
DateTime.Now.Second.ToString();
//n为一个数,可以数整数,也可以事小数
dt.AddYears(n).ToString();
dt.AddDays(n).ToString();
dt.AddHours(n).ToString();
dt.AddMonths(n).ToString();
dt.AddSeconds(n).ToString();
dt.AddMinutes(n).ToString();