Solved

Non-breaking space code inside "empty" text box.

Posted on 2011-09-15
5
520 Views
Last Modified: 2012-08-14
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?
0
Comment
Question by:codefinger
  • 3
5 Comments
 
LVL 28

Expert Comment

by:strickdd
Comment Utility
First make sure you aren't saving " " to the database.
0
 

Author Comment

by:codefinger
Comment Utility
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.
0
 
LVL 83

Expert Comment

by:CodeCruiser
Comment Utility
What's patreg? Where are you seeing the space code?
0
 

Accepted Solution

by:
codefinger earned 0 total points
Comment Utility
Nevermind, found the solution.   Problem does not occur when I use String.Empty() instead of "".

0
 

Author Closing Comment

by:codefinger
Comment Utility
Problem does not occur when I use String.Empty() instead of "".
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now