本文介绍了如何制作gridview的boundfield和imagefield。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在这种情况下,有一个gridview1和gridview2具有BoundFields和ImageFields,它们可以正常工作。 GridView3中的BoundField和ImageField带下划线且无法正常工作。下面的错误代码与BoundField相同。
BoundField和ImageField用错误代码加下划线:
In this case there is a gridview1 and gridview2 that have BoundFields and ImageFields and they work correctly. The BoundField and ImageField in GridView3 are underlined and not functioning. The error code below is the same for the BoundField.
BoundField and ImageField Underlined with Error Code:
Element 'ImageField' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing. J:\a ASP.net\vb\a Astrology\AstrologyGridView\AstrologyGridView\Default.aspx 157 38 AstrologyGridView
<asp:GridView ID="GridView3" AutoGenerateColumns="False" runat="server">
<asp:BoundField HeaderText="OfDate" DataField="OfDate"></asp:BoundField>
<asp:BoundField HeaderText="HouseRange" DataField="House Range"></asp:BoundField>
<asp:BoundField HeaderText="EphemerisRange" DataField="Ephemeris Range">
</asp:BoundField>
<asp:ImageField DataImageUrlField="StartZodiacImage"></asp:ImageField></asp:GridView>
我的尝试:
我将这些名字分开:
日期到OfDate
House Range到HouseRange
等
What I have tried:
I have split up the names:
"Of Date" to "OfDate"
"House Range" to "HouseRange"
etc.
推荐答案
<asp:GridView ID="GridView3" AutoGenerateColumns="False" runat="server">
<Columns>
<asp:BoundField HeaderText="OfDate" DataField="OfDate" />
<asp:BoundField HeaderText="HouseRange" DataField="House Range" />
<asp:BoundField HeaderText="EphemerisRange" DataField="Ephemeris Range" />
<asp:ImageField DataImageUrlField="StartZodiacImage" />
</Columns>
</asp:GridView>
这篇关于如何制作gridview的boundfield和imagefield。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!