摘要:
使用C#生成验证码图片,然后在网页中直接使用,很方便的用法。 using System;using System.Drawing;using System.Drawing.Imaging;using System.Web.UI;using System.Drawing.Drawing2D;using System.IO;/// <summary>/// 生成验证码的类/// </summary>... 阅读全文
posted @ 2013-04-03 14:23
拓荒者IT
阅读(7714)
评论(3)
推荐(4)
摘要:
使用C#来验证一个字符串是否为合法的Email地址: public static bool IsEmail(string email){ String strExp = @"\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"; Regex r = new Regex(strExp); Match m = r.Match(email); ... 阅读全文
posted @ 2013-04-03 14:17
拓荒者IT
阅读(2846)
评论(1)
推荐(0)
摘要:
在做网站的时候,用到了去除html标签的问题,用正则匹配到html标签,然后replace即可。 public static string ReplaceHtmlTag(string html, int length = 0){ string strText = System.Text.RegularExpressions.Regex.Replace(html, "<[^>]+>", ""... 阅读全文
posted @ 2013-04-03 14:13
拓荒者IT
阅读(27544)
评论(3)
推荐(14)

浙公网安备 33010602011771号