原创 還可輸入多少字的字體樣式

font:26px/30px Georgia, Tahoma, Arial; 效果:

原创 SQL根據日期查詢年、月、星期等

DateName(year,GetDate()) as '年',DateName(month,GetDate()) as '月',DateName(day,GetDate()) as '日',DateName(dw,GetDate())

原创 關閉不安全的HTTP方法

在web.config--<configuration>--<system.webServer>節點內添加如下代碼: <security>       <requestFiltering>         <verbs allow

原创 c#使用正則表達式

1.定義正則表達式 private static Regex RegCHZN = new Regex("^[\u4e00-\u9fa5]+$");    //驗證是否是中文 2.使用正則表達式 Match m = RegCHZN.Mat

原创 從指定的數組中,隨機抽取一個數

int[] arrViewCount = new int[] { 1, 3, 5, 7, 9, 2, 4, 6, 8 }; Random r = new Random(); int n = r.Next(0, ar

原创 JS使用正則表達式

1.定義正則表達式 var myReg = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;         //驗證是否是郵件 2.使用正則表達式 if(myReg.test(需要驗證

原创 DataTable轉換成JSON(實驗區APP版本)

/// <summary> /// dataTable轉換成Json格式 /// </summary> /// <param name="dt"></param> /// <

原创 AspNetPager的一些屬性

ShowPageIndex:隱藏上一頁、下一頁按鈕中間的頁碼數字 NumericButtonCount:設置按鈕中間頁碼數字顯示的個數,不能爲0或“”,最小爲1 TextBeforeInputBox:轉到第 TextAfterInputB

原创 【access_token】獲取access_token(Senparc.Weixin.MP.dll)

方法1. //根據appId判斷獲取 if (!AccessTokenContainer.CheckRegistered(appId))//檢查是否已經註冊 { AccessTokenContainer.Register(app

原创 meta網頁編碼

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

原创 GridView批量排序

for (int i = 0; i < this.GridView1.Rows.Count; i++) { TextBox txtOrderId =(TextBox)this.GridView1.Rows[i].FindContr

原创 計算分頁頁數或索引在第幾頁

int totalCount = 100; int totalPageNo = 0; int pageSize = 10; //計算共多少頁 totalPageNo = totalCount % pageSize == 0 ? tot

原创 table邊框合併

外表格樣式:<table border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse;”> 內表格樣式:<table border="1" cel

原创 SQL使用case判斷

1.select flag = case flag when 0 then '有效' when 9 then '刪除' else '其他' end from Article2.select case flag when 0 then '有

原创 【配置開發者】微信公衆平臺,配置開發者模式

1.將下載的Senparc.Weixin.MP.Sample.WebForms項目中的Weixin.aspx部署到服務器上(注意此處設置的token) 2.微信公衆平臺的URL填寫上方配置後的域名地址(僅支持80端口),如http://w