0

我有以下代码,该页面在我提交并尝试保存到数据库之前有效,我将该字段作为 nvarchar(70)。当我选择“基金/投资经理”时,由于“/”页面出现错误。我什至尝试使用 HttpUtility.HtmlEncode("Fund-Investment Manager",....)但这不起作用。以前有没有其他人提出过这个问题?提前谢谢

@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" }
       )
    )
4

1 回答 1

0

你试过转义字符串吗?

基金//投资经理

于 2013-02-20T14:18:37.503 回答