在.aspx中
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="295px">
<Columns>
<asp:TemplateField HeaderText="状态">
<ItemTemplate>
<asp:DropDownList runat="server" DataValueField="state" ID="DropDownList1"></asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
在.aspx.cs中
DropDownList myDropDownList = (DropDownList)this.GridView1.FindControl("DropDownList1");
myDropDownList 值一直为null
在智能提示中也找不到DropDownList1
呼唤远方