随笔分类 -  C#/NET

摘要:1.在应用程序中获取session,System.Web.HttpContext.Current.Session; 2.命名空间如下:IRequiresSessionState 调用方法 public class ProjectInfo : IHttpHandler,System.Web.Sessi 阅读全文
posted @ 2018-12-20 19:16 李寒星 阅读(506) 评论(0) 推荐(0)
摘要:try { DateTime allowTime = DateTime.Now.ToARCUniversalTime().ToARCLocalTime().AddMonths(-3); DateTime ivTime = DateTime.Parse(RadAllInvoice.SelectedDa 阅读全文
posted @ 2018-11-28 17:04 李寒星
摘要:1.不传参 #region 线程-直接调用 //Thread thread = new Thread(new ThreadStart(ThreadDemo)); //thread.Name = " Thread1 "; //thread.Start(); //thread.Join(); #endr 阅读全文
posted @ 2018-11-22 15:23 李寒星
摘要:1. 视频 <staticContent> <mimeMap fileExtension=".mp4" mimeType="video/mp4" /> <mimeMap fileExtension=".m4a" mimeType="video/mp4"/> <mimeMap fileExtensio 阅读全文
posted @ 2018-04-03 17:30 李寒星 阅读(241) 评论(0) 推荐(0)
摘要:[HttpPost] public ActionResult MultiUpload() { System.Web.HttpFileCollectionBase files = Request.Files; //for (var i = 2; i < files.Count; i++) HttpPo 阅读全文
posted @ 2018-03-29 14:36 李寒星 阅读(872) 评论(0) 推荐(0)
摘要:HTTP 错误 500.23 - Internal Server Error 检测到在集成的托管管道模式下不适用的 ASP.NET 设置。 对于500.24 可以通过在配置文件中确保存在<system.webServer> <validation validateIntegratedModeConf 阅读全文
posted @ 2018-01-12 17:56 李寒星 阅读(420) 评论(0) 推荐(0)
摘要:SqlParameter[] sqlParams = new SqlParameter[2];sqlParams[0] = new SqlParameter("@RoleId", roleName);sqlParams[1] = new SqlParameter("@Deleted", false) 阅读全文
posted @ 2017-12-11 09:20 李寒星 阅读(2159) 评论(0) 推荐(0)
摘要:1.net config.json imageUrlPrefix 阅读全文
posted @ 2017-11-17 10:35 李寒星 阅读(137) 评论(0) 推荐(0)
摘要:1.调用视图 声明实体类 string sql = "select * from View_ExchangeDetails order by CreateTime desc"; var dataList = db.Database.SqlQuery<ExchanageDetails>(sql).To 阅读全文
posted @ 2017-08-08 11:57 李寒星 阅读(306) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/jys509/p/4614975.html http://www.cnblogs.com/lc-chenlong/p/3948760.html 安装:TopshelfDemo.exe install 启动:TopshelfDemo.exe start 卸 阅读全文
posted @ 2017-07-28 10:31 李寒星 阅读(284) 评论(0) 推荐(0)
摘要:public class RSACSProviderSecurity { /// <summary> /// 密钥,时间戳 /// 密钥+时间戳=明文签名 /// </summary> #region 公钥加密方法 public static string EncryptRSACSPSecurity 阅读全文
posted @ 2016-09-21 14:52 李寒星 阅读(258) 评论(0) 推荐(0)
摘要:1.读取通过 AppDomain 方法 string basePath = AppDomain.CurrentDomain.BaseDirectory; string keyPath = string.Format("{0}\\{1}.xml", basePath, "Key"); var cont 阅读全文
posted @ 2016-09-20 16:45 李寒星 阅读(158) 评论(0) 推荐(0)
摘要:1.Jsonp的使用 var phoneAgent = navigator.userAgent; var urlDomaintest = " "; function getHref() { var href = window.location.href; return href; } var Pho 阅读全文
posted @ 2016-09-20 16:32 李寒星 阅读(773) 评论(0) 推荐(0)
摘要:暂未更新 阅读全文
posted @ 2016-09-20 16:05 李寒星 阅读(221) 评论(0) 推荐(0)
摘要:1.Post 请求发送方式 实例: const string sResponseEncoding = "gb2312"; //测试文本信息 string postText = "{\"touser\":\"OpenId\",\"msgtype\":\"text\",\"text\":{\"conte 阅读全文
posted @ 2016-09-20 15:42 李寒星 阅读(376) 评论(0) 推荐(0)
摘要:1.选择单一条记录 var Prize = con.Prizes.Where(e => e.PrizeType == 0).Select(p => new { id = Guid.NewGuid(), P = p }).OrderByDescending(p => p.id).FirstOrDefa 阅读全文
posted @ 2016-08-18 16:58 李寒星 阅读(213) 评论(0) 推荐(0)
摘要:<asp:Button ID="SubmitPurchase" Text="提交采购" CausesValidation="true" Width="75px" Height="30px" runat="server" UseSubmitBehavior="false" OnClick="Submi 阅读全文
posted @ 2016-06-02 11:59 李寒星 阅读(197) 评论(0) 推荐(0)
摘要://生成Guid function getGuidGenerator() { var S4 = function () { return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); }; return (S4() 阅读全文
posted @ 2016-05-30 16:45 李寒星 阅读(223) 评论(0) 推荐(0)
摘要:url: window.location.href Agent: navigator.userAgent var tkInfo = { VisitUrl: window.location.href, UserAgent: Visit.Agent, SolutionCatalogId: Visit.S 阅读全文
posted @ 2016-05-19 17:07 李寒星 阅读(252) 评论(0) 推荐(0)
摘要:StringBuilder htmltext = new StringBuilder(); try { //var readPath = Server.MapPath("~/Template/test.html"+templatePage); var readPath = Server.MapPat 阅读全文
posted @ 2016-05-12 18:27 李寒星 阅读(2458) 评论(0) 推荐(0)