FilterExpression via code doesn't work...

B

Bobby Edward

I'm trying to filter an objectdatasource based on words in a textbox.
Here's how I'm doing it...

With odsProjects
.FilterParameters.Clear()
.FilterExpression = "ProjectTitle LIKE %{0}%"
Dim p As New System.Web.UI.WebControls.Parameter("ProjectTitle",
Data.DbType.String, txtKeywords.Text)
.FilterParameters.Add(p)
.DataBind()
End With

This doesn't work.

In fact I get the following error. Can you assist me??? Thanks...

Syntax error: Missing operand before 'Mod' operator.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Data.SyntaxErrorException: Syntax error: Missing
operand before 'Mod' operator.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,120
Latest member
ShelaWalli
Top