I've got a query that on the face of it should be pretty simple, but I'm struggling.
I'm taking user input from a textbox, now if there's something in the textbox, that's fine, I can query against that, but what if there is nothing in there.
I'd like to be able to say if blank or NULL.
The logic I'm thinking of is:
if textbox is not blank then use contents of textbox
else search for blank or NULL
I'm not quite sure how to implement this in a linq to sql structure of code.
I could simply have a different linq to sql code section depending on what the user has typed in, but I'm sure there must be a more sensible way, as the larger a form gets the more difficult it will be to achieve.
Any ideas are welcome.
View Complete Post