2023-01-24

Populating the SQLDatasource SelectCommand

How do I take this string and drop it into the select command?

    String SqlC = "select * from dbo.FindIt where " + SqlStr;

The object is to populate the SelectCommand:

    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
     ConnectionString="<%$ ConnectionStrings:M3ConnectionString %>" 
     SelectCommand = SqlC >
</asp:SqlDataSource>


No comments:

Post a Comment