TIO-0903-TextBoxWithLIKE
In the exercise TIO-0903-TextBoxWithLIKE you state in bullet 2 â.., select WHERE and set the column to au_lname. But for the operator, select LIKE. The source will control named TextBox1.â
SelectCommand="SELECT [au_id], [au_lname], [au_fname], [city], [state] FROM [authors]
WHERE ([au_lname] LIKE '%' + @au_lname + '%')">
<SelectParameters>
<asp:ControlParameter
ControlID="TextBox1"
DefaultValue="CA"
Name="au_lname"
PropertyName="Text"
Type="String" />
</SelectParameters>
But in âyour code should be similar to the followingâ
WHERE ([State] LIKE â%â + @state + â%â)â>
<SelectParameters>
<asp:ControlParameter
ControlID="TextBox1"
DefaultValue="CA"
Name="State"
PropertyName="Text"
Type="String" />
</SelectParameters>
So should one have used set the column to state?
|