Hi I’m trying to get a filter expression working on my content column located in BLOG table on my gridview.
It displays the content column fine with 50 characters but when i try click my asp button to run the filter expression i get an error saying content column not found.
Any idea why this is?
Here’s my code:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:Assignment2ConnectionString %>" SelectCommand="SELECT [blogid], [myfriendid], [inputdate],
Left(content,50) FROM [BLOG]" filterexpression="[content] LIKE '%{0}%' or url LIKE '%{0}%'">
<filterparameters>
<asp:controlparameter controlid="TextBox1" propertyname="Text" />
</filterparameters>
</asp:SqlDataSource>
When you do
Left(content,50)that the column no longer has a nameChange the to this