Checking if a record in datareader is NULL
- by user279521
I have browsed thru other postings on S/O, but I can't find a solution that works for me.
I have a datareader that might return a null value, and if so, I want to value to equal blank
txtMiddleName.Text = rdrGetUserInfo.GetString(1) ?? "";
The string above does not work.
When I walk thru the code, the code jumps to my error trapping block;
Any ideas?