Results 1 to 3 of 3

Thread: Counld not find any attribute 'ID'

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2001
    Posts
    116

    Question Counld not find any attribute 'ID'

    I am currently working my way through a tutorial from my asp.net book and am slowly getting an understanding how this type of coding works. However, I have come to a standstill with the code below.
    Code:
    <asp:dataGrid ID="myWinningBids" AutoGenerateColumns="False" Width="50%" HeaderStyle-BackColor="#ff0000" HeaderStyle-Font-Bold="True" HeaderStyle-Font-Name="Verdana" HeaderStyle-Font-Size="13px" HeaderStyle-ForeColor="#ffffff" ItemStyle-BackColor="Beige" ItemStyle-Font-Name="verdana" ItemStyle-Font-Size="13px" BorderColor="#000000" OnItemCreated="myWinningBids_ItemCreated" Runat="server">
    				<Columns>
    					<asp:TemplateColumn HeaderText="Item Name - Click to Complete purchase.">
    						<ItemTemplate>
    							<asp:hyperlink ID="hypItemName" NavigateUrl='<%# FormatURL(DataBinder.Eval(Container.DataItem, "ItemID"), DataBinder.Eval(Container.DataItem, "Highestbid")) %>' Text='<%# DataBinder.Eval(Container.DataItem, "ItemName") %>' Runat=server />
    						</ItemTemplate>
    					</asp:TemplateColumn>
    					<asp:BoundColumn DataField="HighestBid" HeaderText="Winning Bid" runat="server" ID="Boundcolumn1" NAME="Boundcolumn1" />
    				</Columns>
    			</asp:dataGrid>
    The line of code thats causing problems is:
    Code:
    <asp:BoundColumn DataField="HighestBid" HeaderText="Winning Bid" runat="server" ID="Boundcolumn1" NAME="Boundcolumn1" />
    The attributes ID and NAME are underline in red (In VS.net) and thier tooltip text says 'Counld not find any attribute 'ID' of element 'BoundColumn'

    Has anyone had this problem before? Or have I coded it wrongly?

    Thanks

  2. #2
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    You do not need to specify an id or the runat attribute for bound columns.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2001
    Posts
    116

    Question Thanks

    ok I'll take out those attributes and try again later.

    Thank again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width