現在我有一個Datagrid顯示拖車的一些細節。我想提出一個DropDownList到DataGrid中這樣的位置可以改變,但我不斷收到錯誤:不能把Dropdownlist放到Datagrid中
Error 32 Literal content ('') is not allowed within a 'System.Web.UI.WebControls.DataGridColumnCollection'. C:\inetpub\wwwroot\test\test\lookups\Trailer.aspx 215
我見過的DropDownLists的代碼示例中的DataGrid所以爲什麼我得到這個錯誤之前? 這裏的DataGrid的代碼:
<asp:DataGrid runat="server" CssClass="tblResults" OnItemDataBound="dgList_ItemCreated" AllowSorting="true" OnSortCommand="dgTrailer_Sort" ID="dgTrailers" DataKeyField="ID" AutoGenerateColumns="false">
<HeaderStyle CssClass="tblResultsHeader" />
<AlternatingItemStyle BackColor="#EEEEEE" />
<Columns>
<asp:BoundColumn DataField="TrailerMake" HeaderText="Trailer Make" SortExpression="TrailerMake"></asp:BoundColumn>
<asp:BoundColumn DataField="TrailerLocation" HeaderText="Trailer Location" SortExpression="TrailerLocation"></asp:BoundColumn>
<asp:BoundColumn DataField="Year" HeaderText="Year" SortExpression="Year"></asp:BoundColumn>
你缺少''對不起 –
該行是在 – user2026041