using XihSolutions.DotMSN;  
using XihSolutions.DotMSN.Core;  

11 發表在 痞客邦 留言(0) 人氣()

 using iTextSharp.text;  
using iTextSharp.text.pdf;  

11 發表在 痞客邦 留言(0) 人氣()

一般情況下,Response.Redirect 方法是在服務器端進行轉向,因此,除非使用 Response.Write("<script>window.location='http://dotnet.aspx.cc';</script>") 方法外,是不能在新窗口打開所指定的 URL 地址的。但是,如果仔細分析一下,如果設置 form 元素的 target 屬性,還是有辦法打開新窗口的。下面就是可以採用的兩種方法。

方法一:在服務器端設置 target 屬性,這個方法也非常適用於客戶端不支持腳本的情況。代碼如下:

11 發表在 痞客邦 留言(0) 人氣()

通過查詢結果進行分頁就是以結果集的子集處理查詢結果的過程,這樣,每次返回給用戶的只是當前頁面的數據大小。

DataAdapter對像通過重載Fill方法提供了返回當前頁面數據的功能。然而,這種方法對大數據量的查詢結果並不是最好的選擇,這是因為:當DataAdapter用請求的結果填充DataTable或者DataSet時,數據庫返回的資源仍是全部的查詢結果,只是在返回時附加了額外的限定條件才返回了少量的記錄集的。

11 發表在 痞客邦 留言(0) 人氣()

//獲得漢字的區位碼
  byte[] array = new byte[2];
  array = System.Text.Encoding.Default.GetBytes("啊"); 



int i1 = (short)(array[0] - ''\0'');
  int i2 = (short)(array[1] - ''\0'');


//unicode解碼方式下的漢字碼
  array = System.Text.Encoding.Unicode.GetBytes("啊");
  i1 = (short)(array[0] - ''\0'');
  i2 = (short)(array[1] - ''\0'');


//unicode反解碼為漢字
  string str = "4a55";
  string s1 = str.Substring(0,2);
  string s2 = str.Substring(2,2);


int t1 = Convert.ToInt32(s1,16);
  int t2 = Convert.ToInt32(s2,16);


array[0] = (byte)t1;
  array[1] = (byte)t2;


string s = System.Text.Encoding.Unicode.GetString(array);


//default方式反解碼為漢字
  array[0] = (byte)196;
  array[1] = (byte)207;
  s = System.Text.Encoding.Default.GetString(array);


//取字符串長度
  s = "iam方槍槍";
  int len = s.Length;//will output as 6
  byte[] sarr = System.Text.Encoding.Default.GetBytes(s);
  len = sarr.Length;//will output as 3+3*2=9


//字符串相加
  System.Text.StringBuilder sb = new System.Text.StringBuilder("");
  sb.Append("i ");
  sb.Append("am ");
  sb.Append("王小明");

/////////////////////////////////////////////////////////////////////



string --> byte array 

byte[] data=Syste.Text.Encoding.ASCII.GetBytes(string);

string --> byte

byte data = Convert.ToByte(string);

byte[]-->string

string string = Encoding.ASCII.GetString( bytes, 0, nBytesSize );

11 發表在 痞客邦 留言(0) 人氣()

    浣溪沙

11 發表在 痞客邦 留言(0) 人氣()

window.showModalDialog()方法用來創建一個顯示HTML內容的模態對話框。
window.showModelessDialog()方法用來創建一個顯示HTML內容的非模態對話框。

11 發表在 痞客邦 留言(0) 人氣()

11 發表在 痞客邦 留言(0) 人氣()

該點進去看嗎?

施主│這個問題應該要問你自己

11 發表在 痞客邦 留言(0) 人氣()

= =||   自己看...

我討厭台北的十大原因

11 發表在 痞客邦 留言(0) 人氣()

Close

您尚未登入,將以訪客身份留言。亦可以上方服務帳號登入留言

請輸入暱稱 ( 最多顯示 6 個中文字元 )

請輸入標題 ( 最多顯示 9 個中文字元 )

請輸入內容 ( 最多 140 個中文字元 )

reload

請輸入左方認證碼:

看不懂,換張圖

請輸入驗證碼