HttpUtility.HtmlEncode 方法

將字串轉換為 HTML 編碼的字串。

例如:

publicstringWelcome(string name,int numTimes =1){
     
returnHttpUtility.HtmlEncode("Hello "+ name +", NumTimes is: "+ numTimes);
}

posted @ 2014-02-10 10:47  代码沉思者  阅读(1510)  评论(0编辑  收藏  举报