我有以下代码,页面工作unil我提交它并尝试保存到db,我有字段作为nvarchar(70)。当我选择“基金/投资经理”时,由于'/'页面出现错误。我甚至尝试使用 HttpUtility.HtmlEncode(“基金 - 投资经理”,......),但这不起作用。有没有其他人提出过这个问题? 提前致谢 Hesh
@Html.DropDownListFor(
model => model.JobDesc,
new SelectList(
new List<Object>{
new { value = "Please Select" , text = "Please Select" },
new { value = "Buy-Side Analyst" , text = "Buy-Side Analyst" },
new { value = "Fund/Investment Manager" , text = "Fund/Investment Manager"},
new { value = "Sell-Side Analyst" , text = "Sell-Side Analyst"},
new { value = "Broker" , text = "Broker"},
new { value = "Other" , text = "Other"}
},
"value",
"text", new { @class = "chk" }
)
)
答案 0 :(得分:0)
你试过逃避字符串吗?
基金//投资经理