0
我試圖從數據庫中檢索數據並在典型的SHOPPING網站中顯示它。 現在,我需要一個頁面來顯示在一個字段中的圖像和類別的名稱。asp boundfield在同一字段中存儲多個值
這是我的GridView的
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false">
<columns>
<asp:BoundField DataField="Cat_id" HeaderText="ID" />
<asp:BoundField DataField="Cat_name" HeaderText="Name" />
<asp:BoundField DataField="Cat_desc" HeaderText="Description" />
<asp:ImageField DataImageUrlField="Cat_filepath" ControlStyle-Width="100" ControlStyle-Height="100" HeaderText="Preview Image" />
</columns>
</asp:GridView>
這顯示在各自領域中的所有值我的GridView的設計,但我想要的圖像,並在同一領域的cat_name,我可以用做TemplateField,但我無法通過TemplateField檢索imageurlfield。
請給一個解決方案,如果你能