随笔分类 -  C#

摘要:1 /// 2 /// Verifies that a string is in valid e-mail format 3 /// 4 /// Email to verify 5 /// true if the ... 阅读全文
posted @ 2013-03-17 08:36 自然去留 阅读(209) 评论(0) 推荐(0)
摘要:1 public class HtmlGengerate 2 { 3 public void GengerateHtml() 4 { 5 // 声明控件的正则表达式 6 Regex regRepe... 阅读全文
posted @ 2013-03-10 10:05 自然去留 阅读(156) 评论(0) 推荐(0)
摘要:首先在配置文件web.config或者app.config中定义配置段: 在configuration配置节中配置Country: 定义CountrySection类: 1 public cl... 阅读全文
posted @ 2013-02-16 11:32 自然去留 阅读(185) 评论(0) 推荐(0)
摘要:1 /// 2 /// 通过数字求金额的大写 3 /// decimal p=123758.21m; 4 /// Response.Write (new CommonFunction().ToUpper(p... 阅读全文
posted @ 2013-01-06 11:52 自然去留 阅读(569) 评论(0) 推荐(0)
摘要:首先定义水印生成类: public class ImageWatermark { public static Image CreateWatermark( string fileName, string markStr, ... 阅读全文
posted @ 2012-12-10 20:34 自然去留 阅读(181) 评论(0) 推荐(0)
摘要:publicclassOrdersSection:ConfigurationSection { [ConfigurationProperty("companyID",IsRequired=true)] publicstringCompanyID { get { return(st... 阅读全文
posted @ 2012-10-04 18:06 自然去留 阅读(652) 评论(0) 推荐(0)
摘要:首先需要定义文件信息记录类: 1 public class FileData 2 { 3 private string myFullName; 4 private string myName; 5 private string myEx... 阅读全文
posted @ 2012-08-10 12:23 自然去留 阅读(214) 评论(0) 推荐(0)
摘要:Response.Write("javascript:alert('hahahah!')");ServerControl.Attributes.Add("onclike"," return confirm('are you sure?')");Page.RegisterStartupScript("... 阅读全文
posted @ 2012-08-07 21:16 自然去留 阅读(724) 评论(0) 推荐(0)
摘要:1 public static void ExportExcel() 2 { 3 StringBuilder sb = new StringBuilder(); 4 sb.Append(""); 5 ... 阅读全文
posted @ 2012-08-05 11:40 自然去留 阅读(183) 评论(0) 推荐(0)