M
musosdev
Hi
I have a GridView using an SQLDataSource on my aspx form.
I've got the control parameter in the SQL as follows...
... WHERE ([ProjectName] LIKE @search)
and my control parameter is declared as follows...
<SelectParameters>
<asp:ControlParameter ControlID="txtSearch" PropertyName="Text"
DefaultValue="" Name="search" />
</SelectParameters>
However, I need to be have my SQL be have LIKE % % around my control
parameter. Kinda like...
... WHERE ([ProjectName] LIKE %@search%)
But I can't get any variation on this to work. How can I make sure that my
query returns any row where ProjectName containts whatever is in @search ?!
Thanks,
Dan
I have a GridView using an SQLDataSource on my aspx form.
I've got the control parameter in the SQL as follows...
... WHERE ([ProjectName] LIKE @search)
and my control parameter is declared as follows...
<SelectParameters>
<asp:ControlParameter ControlID="txtSearch" PropertyName="Text"
DefaultValue="" Name="search" />
</SelectParameters>
However, I need to be have my SQL be have LIKE % % around my control
parameter. Kinda like...
... WHERE ([ProjectName] LIKE %@search%)
But I can't get any variation on this to work. How can I make sure that my
query returns any row where ProjectName containts whatever is in @search ?!
Thanks,
Dan