原创 從控制器中跳轉頁面

 Response.Redirect("../Login/Index", false);

原创 ASP.NET MVC 中使用Ckeditor4.5 編輯器

一、在項目中添加Ckeditor4.5.11 (1) 新建 ASP.NET MVC5項目,解壓縮ckeditor_4.5.11_standard.zip,在VS2015的解決方案資源管理器中將得到的“ckeditor”文件夾複製到當前項目

原创 上傳圖片並生成縮略圖

//前端 <input type="file" accept='.jpg,.jpeg,.png,image/jpg,image/jpeg,image/png' id="wz1_file1" name="wz1_file1" value="

原创 此請求的查詢字符串的長度超過配置的 maxQueryStringLength 值

     <system.web> 下 <httpRuntime requestValidationMode="2.0" maxRequestLength="204800" maxQueryStringLength="202400" />

原创 C# 生成二維碼

using ThoughtWorks.QRCode.Codec; using System.Text; using System.Drawing; using System.Drawing.Drawing2D; public string

原创 C# 圖片加白色邊

public string WhiteUp(string t1, int x1, int y1)         {             //獲取圖片寬高             string t3 = "..\\UploadFile

原创 mui的單擊事件 tap

在頁面的最後 <script src="__PUBLIC__/mui/js/mui.min.js"></script> <script type="text/javascript" charset="utf-8">mui.init({sw

原创 阿里雲天氣預報接口代碼-C#應用程序版

//using Newtonsoft.Json;//using Newtonsoft.Json.Linq;//using System.Security.Cryptography.X509Certificates;//using Syst

原创 ASP.NET COOKIES 讀寫

寫入: HttpCookie cook = new HttpCookie("userid", userid.ToString());             Response.Cookies.Add(cook); 讀取:        

原创 asp.net mvc 跨 controll 訪問session

複製處: System.Web.HttpContext.Current.Session["userid"] = userid;  取值處: string userid = HttpContext.Session["userid"].ToS

原创 ASP.NET MVC 上傳附件

try                 {                     HttpPostedFileBase file1 = Request.Files["file1"];          

原创 jquery獲得url的get參數

function GetQueryString(name) {      var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");      var r = window.location

原创 bs_pagination使用方法

<link href="~/Content/pagination/jquery.bs_pagination.min.css" rel="stylesheet" /><script src="~/Content/pagination/jqu

原创 C# 關於線程鎖lock的使用方法

static object locker = new object();函數內:lock (locker)                {//代碼段                    money += 100;           

原创 移動端自適應

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scala