随笔分类 - C#/NET
摘要:1.在应用程序中获取session,System.Web.HttpContext.Current.Session; 2.命名空间如下:IRequiresSessionState 调用方法 public class ProjectInfo : IHttpHandler,System.Web.Sessi
阅读全文
摘要: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
阅读全文
摘要:[HttpPost] public ActionResult MultiUpload() { System.Web.HttpFileCollectionBase files = Request.Files; //for (var i = 2; i < files.Count; i++) HttpPo
阅读全文
摘要:HTTP 错误 500.23 - Internal Server Error 检测到在集成的托管管道模式下不适用的 ASP.NET 设置。 对于500.24 可以通过在配置文件中确保存在<system.webServer> <validation validateIntegratedModeConf
阅读全文
摘要:SqlParameter[] sqlParams = new SqlParameter[2];sqlParams[0] = new SqlParameter("@RoleId", roleName);sqlParams[1] = new SqlParameter("@Deleted", false)
阅读全文
摘要:1.net config.json imageUrlPrefix
阅读全文
摘要:1.调用视图 声明实体类 string sql = "select * from View_ExchangeDetails order by CreateTime desc"; var dataList = db.Database.SqlQuery<ExchanageDetails>(sql).To
阅读全文
摘要:http://www.cnblogs.com/jys509/p/4614975.html http://www.cnblogs.com/lc-chenlong/p/3948760.html 安装:TopshelfDemo.exe install 启动:TopshelfDemo.exe start 卸
阅读全文
摘要:public class RSACSProviderSecurity { /// <summary> /// 密钥,时间戳 /// 密钥+时间戳=明文签名 /// </summary> #region 公钥加密方法 public static string EncryptRSACSPSecurity
阅读全文
摘要:1.读取通过 AppDomain 方法 string basePath = AppDomain.CurrentDomain.BaseDirectory; string keyPath = string.Format("{0}\\{1}.xml", basePath, "Key"); var cont
阅读全文
摘要:1.Jsonp的使用 var phoneAgent = navigator.userAgent; var urlDomaintest = " "; function getHref() { var href = window.location.href; return href; } var Pho
阅读全文
摘要:1.Post 请求发送方式 实例: const string sResponseEncoding = "gb2312"; //测试文本信息 string postText = "{\"touser\":\"OpenId\",\"msgtype\":\"text\",\"text\":{\"conte
阅读全文
摘要:1.选择单一条记录 var Prize = con.Prizes.Where(e => e.PrizeType == 0).Select(p => new { id = Guid.NewGuid(), P = p }).OrderByDescending(p => p.id).FirstOrDefa
阅读全文
摘要:<asp:Button ID="SubmitPurchase" Text="提交采购" CausesValidation="true" Width="75px" Height="30px" runat="server" UseSubmitBehavior="false" OnClick="Submi
阅读全文
摘要://生成Guid function getGuidGenerator() { var S4 = function () { return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); }; return (S4()
阅读全文
摘要:url: window.location.href Agent: navigator.userAgent var tkInfo = { VisitUrl: window.location.href, UserAgent: Visit.Agent, SolutionCatalogId: Visit.S
阅读全文
摘要:StringBuilder htmltext = new StringBuilder(); try { //var readPath = Server.MapPath("~/Template/test.html"+templatePage); var readPath = Server.MapPat
阅读全文

浙公网安备 33010602011771号