PIXNET Logo登入

工作需要筆記

跳到主文

歡迎光臨amychang2014在痞客邦的小天地

部落格全站分類:不設分類

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 7月 31 週五 201511:17
  • C# check session is null or empty

if(!string.IsNullOrEmpty(Session["emp_num"] as string))
{
//The code
}
http://stackoverflow.com/questions/7172910/checking-session-if-empty-or-not
(繼續閱讀...)
文章標籤

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

  • 個人分類:ASP.NET C#
▲top
  • 7月 30 週四 201517:55
  • C# Base64 加解密

Encode
public static string Base64Encode(string plainText)
{
var plainTextBytes =System.Text.Encoding.UTF8.GetBytes(plainText);
returnSystem.Convert.ToBase64String(plainTextBytes);
}
(繼續閱讀...)
文章標籤

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

  • 個人分類:ASP.NET C#
▲top
  • 7月 24 週五 201518:06
  • c# alert

Page.RegisterClientScriptBlock("AlertMsg", "<script language=\'javascript\'>alert(\'" + msg + "\')</script>");
 
http://www.dotblogs.com.tw/mis0800/archive/2014/03/15/144401.aspx?fid=72169
(繼續閱讀...)
文章標籤

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

  • 個人分類:ASP.NET C#
▲top
  • 7月 24 週五 201517:25
  • C# url encode

string encoded = System.Web.HttpUtility.UrlEncode(input);
string decoded =  System.Web.HttpUtility.UrlDecode(encoded);
(繼續閱讀...)
文章標籤

amychang2014 發表在 痞客邦 留言(0) 人氣(7,249)

  • 個人分類:ASP.NET C#
▲top
  • 7月 24 週五 201517:23
  • c# enum switch

enum Colors { None=0, Red = 1, Green = 2, Blue = 4 };
string[] colorStrings = { "0", "2", "8", "blue", "Blue", "Yellow", "Red, Green" };
(繼續閱讀...)
文章標籤

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

  • 個人分類:ASP.NET C#
▲top
  • 7月 21 週二 201511:07
  • JSON Bootstrap Table

http://stackoverflow.com/questions/19098797/fastest-way-to-flatten-un-flatten-nested-json-objects/19101235#19101235
 
http://jsfiddle.net/3rmstg5p/7/
 
(繼續閱讀...)
文章標籤

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

  • 個人分類:JSON
▲top
  • 7月 16 週四 201514:04
  • C# .ajax Internal error 500

注意jQuery內傳的參數名稱和WebService的參數名稱要一致!
 
The Other Reason

Not using JSON.stringify to pass parameter value.
If you not supply type in jQuery, it will use GET method which is not accept in your webservice configuration. Add  ( type : "POST ) in your jQuery code to use POST method.
You are actually request data from different domain. Cross Domain Request (CORS)which is not allowed. Please read here
Content type not supply or not correct. Use "application/json; charset=utf-8"
DataType not not supply or not correct. Use json or jsonp
(繼續閱讀...)
文章標籤

amychang2014 發表在 痞客邦 留言(0) 人氣(2,055)

  • 個人分類:ASP.NET C#
▲top
  • 7月 14 週二 201509:22
  • C# Global rewrite url

void Application_BeginRequest(object sender, EventArgs e)
{
HttpApplication app = sender as HttpApplication;
if(app.Request.Path.IndexOf("FriendlyPage.html") > 0)
{
app.Context.RewritePath("/UnfriendlyPage.aspx?SomeQuery=12345");
}
}
http://www.codeproject.com/Articles/33341/URL-Rewriting-using-ASP-NET-for-SEO
(繼續閱讀...)
文章標籤

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

  • 個人分類:ASP.NET C#
▲top
  • 7月 06 週一 201510:07
  • C# 轉址

Response.Redirect("http://www.flashwolves.com" + HttpContext.Current.Request.Url.PathAndQuery);
 
http://stackoverflow.com/questions/593709/how-to-get-the-url-of-the-current-page-in-c-sharp
(繼續閱讀...)
文章標籤

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

  • 個人分類:ASP.NET C#
▲top
  • 7月 02 週四 201514:04
  • C# 修改DataSet 欄位的值

DataSet 廠商專頁ds = DBstatic.廠商專頁ds;
DataRow[] updateRow = 廠商專頁ds.Tables[0].Select("專頁編號 = '" + 專頁編號 + "'");
updateRow[0]["欄位名稱"] = 欄位變數;
DBstatic.廠商專頁ds = 廠商專頁ds;
(繼續閱讀...)
文章標籤

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

  • 個人分類:ASP.NET C#
▲top
«1...67839»

個人資訊

amychang2014
暱稱:
amychang2014
分類:
不設分類
好友:
累積中
地區:

熱門文章

  • (1,234)c#移除HTML Tag
  • (544)ASP.NET C# 取得圖片長、寬by stream
  • (33)[PhoneGap] 獲得目前地理位置
  • (26)jQuery取url變數
  • (14)社會創新
  • (11)jQuery selector class child each
  • (9)C# Convert、Parse、TryParse、(int) 區別使用
  • (6)jQuery select ASP.NET Control
  • (2)INSERT、UPDATE FROM SELECT
  • (3)Beauty Design

文章分類

  • RWD (0)
  • JSON (1)
  • 物件導向 (1)
  • ASP.NET MVC (1)
  • JSON (1)
  • Google API (2)
  • IIS (3)
  • SQL (15)
  • CSR企業社會責任 (3)
  • PhoneGap (19)
  • Mobile (2)
  • Design (3)
  • CSS (38)
  • 其它 (18)
  • New Project (1)
  • jQuery (71)
  • MSSQL (12)
  • ASP.NET C# (136)
  • Facebook (5)
  • JavaScript (48)
  • 未分類文章 (1)

最新文章

  • 上傳前預覽
  • SQL 排序置換
  • 臨時網址
  • C# 載入資料夾內所有圖片
  • 判別行動裝置
  • 使用a 呼叫js 埋ga
  • C# 直接下載檔案
  • 圖片按鈕 input file
  • [轉貼]上傳檔案前,JavaScript檢查檔案格式、大小
  • css goTop

文章精選

文章搜尋

參觀人氣

  • 本日人氣:
  • 累積人氣: