原创 SESSION和COOKIE的使用

 在各個網頁間的變量傳遞和一些記錄用戶的登陸信息要用到SESSION和COOKIE。在ASP.NET中使用COOKIE比ASP中稍微麻煩一點,因爲我們要申明變量。首先看一下SESSION的使用,基本和ASP差不多 寫入一個SESSION:

原创 跨頁面傳值

  關於頁面傳值的方法,引發了很多討論。看來有很多人關注這個,我就我個人觀點做了些總結,希望對大家有所幫助。   1.  使用QueryString

原创 動態創建selectjs 操作select和option

1.動態創建select function createSelect(){ var mySelect = document.createElement("select"); mySelect.id

原创 重寫DataGridView,添加序號列

重寫DataGridView,添加序號列 using System; using System.Text; using System.Collections; using System.Collections.Generic; using

原创 DataGridView打印分頁類

using System; using System.Collections.Generic; using System.Text; using System.Drawing.Printing; using System.Drawing;

原创 meta 用法

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

原创 通訊平臺登陸代碼

  using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing

原创 打印DataGridView數據,可以加眉頭和頁尾

 由於數據保密性故將圖片處理,代碼先貼上     獲取數據代碼: using System; using System.Collections.Generic; using System.ComponentModel; using Sy

原创 繪製驗證碼圖片

 驗證碼技術是網站開發過程中保護網站安全的最基本環節,它可以防止非法人員利用註冊工具或登錄工具來攻擊網站。本節通過一個實例來介紹,如何在網站中繪製驗證碼圖片。 程序開發步驟:(1)新建一個網站,默認主頁名爲Default.aspx。(2)

原创 顯示、隱藏DataGridView的列

最近閒來無事,就做了個自定義顯示隱藏DataGridView列的控件。如下圖,左邊是隱藏字段,右邊是顯示的字段,可以上下排序、置頂置底,保存之後DataGridView會按照以選擇的字段順序調整列的先後順序。雙擊字段可以移除到列一個列表中

原创 ExcelHelper(Excel和C#、asp.net導入導出,通用類)

 /// <summary> /// 插列(在指定WorkSheet指定列右邊插入指定數量列) /// </summary> /// <

原创 設置或讀取config文件(winform)

using System; using System.Xml; using System.Configuration; using System.Collections.Specialized; /// <summary> ///Set

原创 導出excel

StringBuilder sb = new StringBuilder(); //標題 sb.Append("MAC地址,生產商,報備廠商,終端類型,硬件版本,軟件版本kernel,軟件版

原创 存儲過程分頁

一,首先創建分頁存儲過程CREATE PROCEDURE usp_PagingLarge @TableNames VARCHAR(300), --表名,可以是多個表,但不能用別名 @PrimaryKey VARCHAR(100)

原创 .net中的反射機制的使用

  .NET反射的定義:審查元數據並收集關於它的類型信息的能力。 元數據是一種二進制信息,用以對存儲在公共語言運行庫可移植可執行文件 (PE) 文件或存儲在內存中的程序進行描述。將您的代碼編譯爲 PE 文