首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

偶的神,DataList调出来的分类,链接搞不上去啊该怎么解决

2012-04-26 
偶的神,DataList调出来的分类,链接搞不上去啊。DataBinding:“System.Data.DataRowView”不包含名为“ST_c_id”

偶的神,DataList调出来的分类,链接搞不上去啊。
DataBinding:“System.Data.DataRowView”不包含名为“ST_c_id”的属性。

C# code
    <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1">    <ItemTemplate>        <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/Skin/titleindex.GIF" />        <a href='index_<%# DataBinder.Eval(Container.DataItem, "ST_c_name")%>_<%# DataBinder.Eval(Container.DataItem, "ST_c_id")%>.aspx '>        <asp:Label ID="ST_c_nameLabel" runat="server" Text='<%# Eval("ST_c_name") %>' />        </a>    </ItemTemplate></asp:DataList>


[解决办法]
你的 数据源里面没有 ST_c_id 这个字段,你必须select ST_c_id ,...出来

热点排行