Asp.net sqldatasource selectcommand中的语法
我的SqlDataSource selectcommand由Eval单向数据绑定语法的String.Format功能动态更改。它工作正常。但是,我需要把两个列值放在中间的ItMyType + ''+iTimeDeals'作为ITEMFILL中,但是当我得到消息时,我不能得到正确的语法:服务器标签没有很好地形成 你能帮忙吗?非常感谢Asp.net sqldatasource selectcommand中的语法,asp.net,sqldatasource,Asp.net,Sqldatasource,我的SqlDataSource selectcommand由Eval单向数据绑定语法的String.Format功能动态更改。它工作正常。但是,我需要把两个列值放在中间的ItMyType + ''+iTimeDeals'作为ITEMFILL中,但是当我得到消息时,我不能得到正确的语法:服务器标签没有很好地形成 你能帮忙吗?非常感谢 这可能是一个更普遍的问题 <asp:SqlDataSource ID="SqlDataSource1" runat="server" C
这可能是一个更普遍的问题
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ConnectionStrings:conn %>"
SelectCommand='<%# Eval("TypeID", "SELECT ItemID, ItemType, ItemType + "\" \"" + ItemDescription As ItemInfo WHERE ItemType = {0}")%>'>
</asp:SqlDataSource>
HiI按照中的建议以这种方式解决了问题 在items.aspx.vb中 Protected Const SqlQuery As String=选择ItemID、ItemType、ItemType++''+ItemDescription作为ItemInfo,其中ItemType={0} 在items.aspx中 非常感谢那么这不是问题,而是问题