I have this SqlDataSource:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConflictDetection="CompareAllValues"
ConnectionString="<%$ ConnectionStrings:OracleXexdb %>"
ProviderName="<%$ ConnectionStrings:OracleXexdb.ProviderName %>"
SelectCommand="select col1, col2, col3 from table where col1 < 2000 and (col2 = :col2 OR :col2 is null)"
OnSelecting="SqlDataSource1_Selecting"
>
<SelectParameters>
<asp:ControlParameter ControlID="codagent" Name="col2" PropertyName="Text" Type="String" ConvertEmptyStringToNull="true" DefaultValue=""/>
</SelectParameters>
</asp:SqlDataSource>
codagent is an <asp:TextBox> and the user can put a value or nothing (""), if the user leaves the TextBox with nothing, the SqlDataSource retrieves no values. My goal is allow user to get all the col2 values, without filter
Am I missing something?