是否可以将字段名称用作 SQLDataSource 中的选择参数?
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:DbConnection %>"
ProviderName="<%$ ConnectionStrings:DbConnection.ProviderName %>"
SelectCommand="select * from sometable where @FieldKey = @FieldValue">
<SelectParameters>
<asp:Parameter Name="FieldKey" Type="String" />
<asp:Parameter Name="FieldValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>