C# 如何使用asp.net mvc Html.DropDownList帮助程序将自定义项添加到下拉列表的顶部?

C# 如何使用asp.net mvc Html.DropDownList帮助程序将自定义项添加到下拉列表的顶部?,c#,asp.net,jquery,asp.net-mvc,C#,Asp.net,Jquery,Asp.net Mvc,我的asp.net mvc网站上有一个下拉列表: <%= Html.DropDownList("CustCodes") %> 我的控制器: ICallService sc = new CallService(); IList<CustCode> custCodes = sc.GetCustCodes(); ViewData["CustCodes"] = new SelectList(custCodes, "ID", "Name"); ICallService

我的asp.net mvc网站上有一个下拉列表:

<%= Html.DropDownList("CustCodes") %>

我的控制器:

 ICallService sc = new CallService();
 IList<CustCode> custCodes = sc.GetCustCodes();
 ViewData["CustCodes"] = new SelectList(custCodes, "ID", "Name");
ICallService sc=newcallservice();
IList custCodes=sc.GetCustCodes();
ViewData[“CustCodes”]=新的选择列表(CustCodes,“ID”,“Name”);
我想要的是,一旦下拉列表显示出来,顶部要么有一个空白条目,要么有一个显示“选择客户”的选项。我是否需要使用jquery来完成这项工作,或者DropDowList助手中是否内置了我缺少的东西


谢谢。

使用包含选项标签的覆盖

 <%= Html.DropDownList("CustCodes",
                       ViewData["CustCodes"] as SelectList,
                       "Select a Customer",
                       null ) %>