codefinger
asked on
Non-breaking space code inside "empty" text box.
Both the clinic no and Address2 are null in the database:
This is how they are retrieved:
Then their values are assigned to textboxes on a web form:
For the Clinic_No, nothing is displayed in the textbox, which is correct.
However, for Address2, the html code for a non-breaking space is
displayed inside the text box!
What could I be doing wrong?
This is how they are retrieved:
patreg.ClinicNo = IIf(IsDBNull(xdr("CLINIC_NO")), "", xdr("CLINIC_NO"))
patreg.Address2 = IIf(IsDBNull(xdr("ADDRESS2")), "", xdr("ADDRESS2"))
Then their values are assigned to textboxes on a web form:
For the Clinic_No, nothing is displayed in the textbox, which is correct.
However, for Address2, the html code for a non-breaking space is
displayed inside the text box!
What could I be doing wrong?
First make sure you aren't saving " " to the database.
ASKER
I did. The database shows the value as null, so the problem seems to be occuring during/after retrieval, not during the save.
Good starting question, though.
Good starting question, though.
What's patreg? Where are you seeing the space code?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Problem does not occur when I use String.Empty() instead of "".