原创 枚舉操作大全
定義: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks;
原创 cookie保存,json、字符串相互轉換
cookie讀寫操作: addcookie函數中,對text進行了eacape編碼,方便在各種瀏覽器,下都可以讀取。 所以取值的時候需要unescape 解碼。 function getCookie(name) { var str
原创 model轉json
1、List轉換爲json C.peixun.Address ca = new C.peixun.Address(); List<M.peixun.AddressModel> amlist = ca.GetList(School.id
原创 aspx中如何直接調用類庫中的方法
方法一:axpx頭部應用類庫 <%@ Import Namespace="System.Xml.Linq" %> 方法二:在Web.Config中統一配置 <system.web> <pages> <namespaces
原创 獲取微信企業號media_id
protected void Button1_Click(object sender, EventArgs e) { if (File1.PostedFile.ContentLength != 0)
原创 企業號認證接口
認證接口文檔地址:http://qydev.weixin.qq.com/wiki/index.php?title=OAuth驗證接口 認證接口下面有3個接口:身份驗證、成員登錄授權、單點登錄授權 下面給出官方給的解釋: 身份驗證:企業應用
原创 微信企業號接收消息並自動響應
花了2天時間做了企業號接收消息功能測試,微信官方的文檔給了我很大的幫助,但是恰恰卡時間最長的,也是官方文檔上的一段有誤導性的說明。帶我細細道來 首先把微信發送信息到企業號服務器,然後企業號自動響應的過程圖示下,網上找的,感覺描述的很好:
原创 方案一和方案二執行結果記錄
/* --方案二執行: declare @StrSql nvarchar(4000) declare @CurrentPage INT declare @PageSize INT declare @Total INT set @Cur
原创 xml操作讀取
xml文件讀取可以是讀取外部*.xml文件,也可以是讀取xml格式的字符串。使用Load和LoadXml函數來做讀取操作。 代碼如下: string xml = "<xml><aa>111111</aa><bb><cc>33333</cc
原创 html單元塊fieldset
<fieldset style="margin:20px;padding:20px;"> <legend>上傳</legend> <div class="h
原创 獲取post過來的stream數據
using (Stream stream = HttpContext.Current.Request.InputStream) { Byte[] postBytes
原创 C#post、get發送並且接收數據
public static string SendQingQiu(string sUrl, string sParam, string method) { string result = "";
原创 字符串處理
1、字符串本身可被視作數組,例如有字符串string str="hello world"; str.length等於11 foreach(char aa in str)可執行遍歷 char[] chars=str.ToCharArray(
原创 Dictionary用法總結
說明 必須包含名空間System.Collection.Generic Dictionary裏面的每一個元素都是一個鍵值對(由二個元素組成:鍵和值) 鍵必須是唯一的,而值不需要唯一的 鍵和值都可以是任何類型(