- 博客(16)
- 收藏
- 关注
原创 win7家庭普通版升级到旗舰版方法
<br />升级方法如下:<br />打开开始菜单,里面有一个程序叫做WINDOWS ANYTIME UPDATE,直接点击,输入打算升级版本的序列号即可。<br />切记不可跳跃升级,普通版先要升级到高级版才能再升级到旗舰版<br /> Home Premium(家庭高级版): 27GBM-Y4QQC-JKHXW-D9W83-FJQKD <br />Ultimate(旗舰版): 6K2KY-BFH24-PJW6W-9GK29-TMPWP 22TKD-F8XX6-YG69F-9M66D-PMJB <br /
2010-11-26 18:43:00 753
转载 C#.NET Split 的几种使用方法
<br />一种方法:<br /><br /> string s = "abcdeabcdeabcde";<br /> string[] sArray = s.Split('c');<br /> foreach (string i in sArray)<br /> Console.WriteLine(i.ToString());<br /> Console.ReadKey();<br /
2010-11-03 17:14:00 411
翻译 Unicode编码与字符对应表程序
<br />using System.Text;//引用命名空间<br />//不包括128以前的<br />//0xFFFF 为Unicode最大长度<br />StringBuilder s = new StringBuilder(0xFFFF * 3);<br /> for (int i = 128; i < 0xFFFF; i++)<br /> {<br /> if (i % 50 == 0)<br /> {<br />
2010-11-03 16:36:00 830
原创 AJAX 注删用户名无刷新验证
//HTML代码://JS代码:var XmlHttp;function createXMLHttpRequest() { try { XmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { XmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (oc) {
2010-11-01 10:07:00 307
原创 OleDbCommandBuilder批量更新数据库[Session的应用]
<br />//为了便于阅读写的有些地方有点重复,见谅<br /> <br />//Web.config数据库链接字符串<br /> <connectionStrings><br /> <add name="access" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|/ccc.mdb" providerName="System.Data.OleDb"/><br /> </connecti
2010-10-07 17:55:00 983
翻译 正则表达式收集
(^(/d{2,4}[-_-—]?)?/d{3,8}([-_-—]?/d{3,8})?([-_-—]?/d{1,7})?$)|(^0?1[35]/d{9}$)可验证如下27种格式:1108888888888888888888888-12388888888-234350871-8888888-123023-88888888-2343586-0871-8888888-1238888888_12388888888_234350871_8888888_123023_88888888_2343586_0871_888
2010-09-29 13:49:00 283
原创 AspNetPager分页实例
//后台程序using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControl
2010-09-26 12:05:00 315
原创 遍历页面所有TextBox控件并给它赋值为string.Empty
foreach (Control control in this.Form.Controls) { if (control is System.Web.UI.WebControls.TextBox) { TextBox txt = (TextBox)control; txt.Text = String.Empty ; }
2010-07-15 08:29:00 378
翻译 .net实现邮件发送代码
using System;using System.Collections.Generic;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Net.Mail;public partial class _Default : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) {
2010-06-28 17:28:00 454
翻译 杂项
隐藏代码验证: ValidateRequest="false"码证控件格式是否正确:IsValid客户端IP:Request.UserHostAddress弹出对话框:string script = "alert('hi')"; Page.ClientScript.RegisterStartupScript(this.GetType(), null, script, true);UpdatePanel弹出对话框ScriptManager.RegisterStartupScript(this, this.
2010-06-03 08:40:00 288
原创 URL参数解码
<br />可自已修改编码方式<br />引入命名空间<br />using System.Collections.Specialized;<br />using System.Text;<br />方法<br /> NameValueCollection gb2312Requests = HttpUtility.ParseQueryString(Request.Url.Query, Encoding.GetEncoding("UTF-8"));<br /> <br />string iid = gb231
2010-06-02 19:28:00 351
原创 ASP.NET常用方法
<br />隐藏代码验证: ValidateRequest="false"<br />码证控件格式是否正确:IsValid<br />客户端IP:Request.UserHostAddress<br /> <br />弹出对话框:<br />string script = "alert('hi')";<br /> Page.ClientScript.RegisterStartupScript(this.GetType(), null, script, true);<br /> <br />UpdateP
2010-06-02 19:27:00 212
翻译 生成随机验证码
1.Random random = new Random(); //声明随机类对象 protected void Page_Load(object sender, EventArgs e) { if(!IsPostBack) lblCheckCode.Text = random.Next(1000, 9999).ToString(); }2. public string RandomNum(int n) // { //定义一个
2010-06-02 19:23:00 281
翻译 ASP.NET裁出HTML字符串中的图片地址
using System.Text.RegularExpressions;//顶部引用string ohtml = "这是你的全部HTML代码"; System.Text.RegularExpressions.MatchCollection m; //提取字符串的图片 m = Regex.Matches(ohtml, "("); for (int i = 0; i {
2010-06-02 18:00:00 363
翻译 substring完美截取HTML字符
public string GetContentSummary(string content, int length, bool StripHTML) { if (string.IsNullOrEmpty(content) || length == 0) return ""; if (StripHTML) { System.Text.RegularExpressions
2010-06-02 17:56:00 844
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人