文章分类 -  C#

摘要:实际项目中,我们有时可能要根据不同的需求给控件设置不同的背景颜色或边框颜色... 一般情况下我们可通过 System.Drawing.Color选择某个值,但有时我们更希望给一个二进制的值,那么我们可以这样 System.Drawing.Color.FromName("dde2f2"); 阅读全文
posted @ 2009-03-20 13:14 草市江田 阅读(739) 评论(0) 推荐(0)
摘要:首先添加一个html控件FileUpload并将其转换为服务器断控件(runat="server"),再添加两个Button按钮。 protected void Button2_Click(object sender, EventArgs e) { //把图片保存成数据库二进制形式 Stream ImageStream; string Pat... 阅读全文
posted @ 2008-05-22 16:11 草市江田 阅读(544) 评论(0) 推荐(0)
摘要:static bool IsNumeric(string str) { if(str==null||str.Length==0) return false; foreach(char c in str) { if(!char.InNumber(c)) { return false; } } return true; } //正则表达的写法: static bo... 阅读全文
posted @ 2008-05-14 17:22 草市江田 阅读(2228) 评论(0) 推荐(0)