I am having trouble getting wildcard characters into my query afte having the user run a search for a particular record. Here is my code below:
ConnectionString="<%$ ConnectionStrings: myquests %>"
SelectCommand="SELECT * FROM myqs" FilterExpression="firstname LIKE '%{0}%'"
UpdateCommand="UPDATE myquesties SET firstname = @firstname, lastname = @lastname, phonenumber = @phonenumber
WHERE id = @id">
Try setting the ConvertEmptyStringToNull property to false (it is true by default) like this:
You may also need to set a DefaultValue.
See the properties of a ControlParameter here: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.controlparameter.aspx
Looks like you want to use filter parameter instead select parameter.
Thank you that did the trick along with the
Thank you, adding the
沒有留言:
張貼留言