请教关于Asp.net中GridView和模板列的问题?
在GridView中有两个模板列,一个为DropDownList,一个为LinkButton,然后给LinkButton定义了一个Command,给Command传入了一个参数,如下所示:
<asp:GridView ID= "GridView1 " runat= "server " DataSourceID= "DataSource1 "
AutoGenerateColumns= "false " AllowSorting= "True ">
<Columns>
<asp:TemplateField HeaderText= "类别 ">
<ItemTemplate>
<asp:DropDownList runat= "server " DataSourceID= "cat "
DataTextField= "类别 " DataValueField= "类别 " ID= "ddl ">
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID= "LinkButton3 " runat= "server " OnCommand= "Test " Co