我有以下错误:
'DirectActivity' does not contain a definition for 'ddl_jobcode_Id2' and no extension method 'ddl_jobcode_Id2' accepting a first argument of type 'DirectActivity' could be found (are you missing a using directive or an assembly reference?)
在我的 aspx 中,我创建了一个 DropDownList,如下所示:
<asp:DropDownList ID="ddl_jobcode_Id2" runat="server" DataSourceID="ddl_ActivityType2"
DataTextField="jobCode" DataValueField="ID" SelectedValue='<%# Bind("jobCode_ID2", "{0}") %>'
OnDataBound="ddl_jobcode_Id2_DataBound"
onselectedindexchanged="ddl_jobcode_Id2_SelectedIndexChanged1"
AutoPostBack="True">
</asp:DropDownList>
我需要添加一个控件,以便在我写的 .cs 文件中
protected void ddl_jobcode_Id2_SelectedIndexChanged1(object sender, EventArgs e)
{
if(this.ddl_jobcode_Id2.SelectedValue == "19" )
{ ...}}
它只是显示这个错误ddl_jobcode_Id2
谁能帮帮我?非常感谢!!!