上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页
摘要: var MyString = "******中华人民共和国******_"; var Myinfo = MyString.Trim("*".ToCharArray()); var Myinfo1 = MyString.Trim(new char[2] { '*', '_' }); Response.Write(MyString + "\n" + Myinfo+"\n"+Myinfo1);******中华人民共和国******_中华人民共和国******_中华人民共和国 阅读全文
posted @ 2013-02-16 17:45 yellowshorts 阅读(477) 评论(2) 推荐(0) 编辑
摘要: var MyBuilder = new StringBuilder("你的工资是:"); var MySalary = 4120.24; MyBuilder.AppendFormat("{0:C}", MySalary);Response.Write(MyBuilder);//你的工资是:¥4,120.24 阅读全文
posted @ 2013-02-16 17:35 yellowshorts 阅读(139) 评论(0) 推荐(0) 编辑
摘要: var Mystring = "钓鱼岛是中国的 I love China"; var MyDate = new ASCIIEncoding(); byte[] MyBytes = MyDate.GetBytes(Mystring); var myLength = 0; for (int i = 0; i <= MyBytes.Length - 1; i++) { if (MyBytes[i] == 63)//判断是否为汉字或全脚符号 { myLength++; } myLength++; } 阅读全文
posted @ 2013-02-16 17:27 yellowshorts 阅读(397) 评论(0) 推荐(0) 编辑
摘要: 利用C#代码实现:string Url="www.baidu.com"l;Response.Write("<script language='javascript'>setTimeout(\"{location.href='" + url + "'}\",3000);</script>"); //自动跳转Button1.Attributes.Add("onclick","setTimeout(\"{location.hr 阅读全文
posted @ 2013-02-16 08:59 yellowshorts 阅读(2432) 评论(0) 推荐(0) 编辑
摘要: System.Data.SqlClient.SqlError: 因为数据库正在使用,所以无法获得对数据库的独占访问权。 (Microsoft.SqlServer.Smo)在Master数据库上执行如下查询:ALTER DATABASE[databasename]SET OFFLINE WITH ROLLBACK IMMEDIATE 阅读全文
posted @ 2013-02-05 10:49 yellowshorts 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 1. 打开新的窗口并传送参数传送参数:response.write("<script>window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"')</script>")接收参数:string a = Request.QueryString("id");string b = Request.QueryString("id1");2.为按钮添加对话框 Button1.At 阅读全文
posted @ 2013-02-02 09:39 yellowshorts 阅读(169) 评论(0) 推荐(0) 编辑
摘要: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JqueryCSMethodForm.aspx.cs" Inherits="JQuerWeb.JqueryCSMethodForm" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-trans 阅读全文
posted @ 2013-02-02 09:15 yellowshorts 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 网站在线人数:void Application_Start(object sender, EventArgs e) { // 在应用程序启动时运行的代码 //初始化 Application["counter"] = 0; } void Application_End(object sender, EventArgs e) { // 在应用程序关闭时运行的代码 } void Application_Error(object sender, EventArgs e) { ... 阅读全文
posted @ 2013-01-31 17:34 yellowshorts 阅读(498) 评论(0) 推荐(0) 编辑
摘要: <asp:HyperLink ID="HyperLink1" runat="server"NavigateUrl='<%# Link.ToCategory(Request.QueryString["DepartmentID"], Eval("CategoryID").ToString()) %>' Text='<%# HttpUtility.HtmlEncode(Eval("Name").ToString()) %>'ToolTip= 阅读全文
posted @ 2013-01-30 11:15 yellowshorts 阅读(112) 评论(0) 推荐(0) 编辑
摘要: C#:Regex rx = new Regex("^[\u4E00-\u9FA5]+$");if(rx.IsMatch(textbox1.text)){ 是汉字}else{ 不是汉字}js:function checkname(name){ var strExp=new RegExp(/^[\u4E00-\u9FA5]+$/);if(strExp.test(name)){ return true;}else{ return false;}} 阅读全文
posted @ 2013-01-28 11:39 yellowshorts 阅读(5531) 评论(0) 推荐(1) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页