0
DROPDOWNLIST我有這樣的代碼,它使用LINQ填充一個DropDownList:LINQ與Server.HtmlDecode
var userCategories = DataAccessLayer.Context.Categories
.Where(c => c.UserName == HttpContext.Current.User.Identity.Name)
.Select(c => new { c.ID, c.Category })
.OrderBy(c => c.Category);
CategoryDropDownList.DataSource = userCategories;
CategoryDropDownList.DataValueField = "ID";
CategoryDropDownList.DataTextField = "Category";
CategoryDropDownList.DataBind();
我會在哪裏把Server.HtmlDecode的範疇?
是什麼讓你覺得你需要? – 2011-02-18 04:17:11