Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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:
VB
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

VB
<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>


What I have tried:

I have split up the names:

"Of Date" to "OfDate"
"House Range" to "HouseRange"
etc.
Posted
Updated 26-Jun-18 6:45am

1 solution

You're missing the <columns> element:
<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>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900