Link to home
Start Free TrialLog in
Avatar of codefinger
codefingerFlag for United States of America

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:

patreg.ClinicNo = IIf(IsDBNull(xdr("CLINIC_NO")), "", xdr("CLINIC_NO"))
patreg.Address2 = IIf(IsDBNull(xdr("ADDRESS2")), "", xdr("ADDRESS2"))

Open in new window


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?
Avatar of strickdd
strickdd
Flag of United States of America image

First make sure you aren't saving " " to the database.
Avatar of codefinger

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.
Avatar of Nasir Razzaq
What's patreg? Where are you seeing the space code?
ASKER CERTIFIED SOLUTION
Avatar of codefinger
codefinger
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Problem does not occur when I use String.Empty() instead of "".