I’m converting a project to use ObjectDataSources instead of SqlDataSources. I’m using text boxes for user input of dates. When these were left blank with a SqlDataSource, the value sent to the stored procedure was null, allowing me to get the right results from a query with no date specified.
With the ObjectDataSource, a blank input to the date text boxes gets converted to 01/01/0001 00:00:00, which is not acceptable for the query.
Anyone know how I can receive a null value for this parameter on my ObjectDataSource when the textbox is left empty?
thanksHi
I found a way to do this, by checking for mindate inline and replacing with null. Feels a bit hacky, but it works fine, and I can’t find any other suggestions. If you have a better idea, please let me know!