2
使用和不使用Server.HtmlDecode()
有什麼區別?什麼是Server.HtmlEncode()?
例如:
txtLocation.Text = Server.HtmlDecode(awardShowYear.ShowLocation);
txtLocation.Text = awardShowYear.ShowLocation;
是什麼的代碼這兩條線之間的差異?
使用和不使用Server.HtmlDecode()
有什麼區別?什麼是Server.HtmlEncode()?
例如:
txtLocation.Text = Server.HtmlDecode(awardShowYear.ShowLocation);
txtLocation.Text = awardShowYear.ShowLocation;
是什麼的代碼這兩條線之間的差異?
第一招:
txtLocation.Text = Server.HtmlDecode(awardShowYear.ShowLocation);
將從字符串中刪除任何HTML編碼並分配解碼結果到txtLocation.Text。
第二個:
txtLocation.Text = awardShowYear.ShowLocation;
將簡單地分配字符串txtLocation.Text,保留任何HTML編碼,它是存在的。
thnxs man ......... – user993634
ShowLocation是否保存HTML?或者一個原始字符串? –