随笔分类 -  c#

摘要:public class EnumExt {public static List ToListItem() { List li = new List(); foreach (int s in Enum.GetValues(typeof(T))) { li.Add(new ListItem { Va... 阅读全文
posted @ 2015-05-02 17:17 王鹏飛
摘要:if(!IsPostBack) { fuPhoto.Attributes.Add("onchange", "javascript:__doPostBack('" + lbUploadPhoto.ClientID.Replace("_","$") + "','')"); } 阅读全文
posted @ 2015-03-27 19:45 王鹏飛 阅读(181) 评论(0) 推荐(0)
摘要://取图片 MatchCollection matchs = Regex.Matches(AskText,@" ]*src=([""']*)(?[^'""]*)\1[^>]*>", RegexOptions.IgnoreCase); List PicArray=new List(); foreach... 阅读全文
posted @ 2015-03-20 16:19 王鹏飛 阅读(154) 评论(0) 推荐(0)
摘要:public static IQueryable GetWeiXinTuWenList() { using (var Model = new Model.WeiXinEntities()) { var List... 阅读全文
posted @ 2015-02-04 18:55 王鹏飛 阅读(1597) 评论(0) 推荐(0)
摘要:一般是因为web.config没有配置的原因!只要在下加上就可以啦。 阅读全文
posted @ 2015-01-22 14:14 王鹏飛 阅读(623) 评论(0) 推荐(0)
摘要:1,打开如下图的Model1.Context.cs文件2,找到Base:(ConnString.conn)是我改的。默认生成的是"name=实体连接字符串"Connstring.conn代码如下: public static string conn { get { var dnnConnectS... 阅读全文
posted @ 2015-01-19 15:51 王鹏飛 阅读(130) 评论(0) 推荐(0)
摘要:在dnn下调用第三方dll的微信sdk,代码如下: WebClient wc = new WebClient();wc.Encoding = encoding ?? Encoding.UTF8;wc.DownloadString(url);在调用wc.DownloadString(url);时出现S... 阅读全文
posted @ 2015-01-17 17:24 王鹏飛 阅读(1609) 评论(0) 推荐(0)