if (Request.Browser.Browser != "IE")
{

     // 如果不是IE的話就

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

假如DT是某個DataTable的話

DT.Compute("SUM(某個欄位名)", "").ToString()

就是某個欄位的加總了

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

用DataGrid的ItemCreated事件
private void GridWelkin_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{

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


foreach ( DataGridItem myRow in DataGrid_Welkin.Items )
{

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

先取得Div或是Span的element

然後用document.getElementById('剛剛取得的element').focus()去把遊標移進去

用document.getElementById('剛剛取得的element').scrollTop=

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

// 這裡以重複六個字元就會列印出錯誤為例
char[] myNewPassword = txtNewPassword.Text.Trim().ToCharArray(0,txtNewPassword.Text.Trim().Length);
char tempChar   = '!';

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

在Page_Load事件裡加兩行
Response.Cache.SetExpires(DateTime.Now);
Response.Expires = -1;

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

傳入字串跟字串的長度
private string CutText(string myStr,int myLength)
{

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

//取得日期的星期別
private string Get_Weekday(string myDate)
{

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


ListItem myListItem;

// 先清空下拉式選單的資料

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