Solved

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

Posted on 2011-09-15
5
535 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 28

Expert Comment

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

Author Comment

by:codefinger
ID: 36546282
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
ID: 36570526
What's patreg? Where are you seeing the space code?
0
 

Accepted Solution

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

0
 

Author Closing Comment

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

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB.Net creating Contact in Outlook 1 57
Adding 1 the value of input "text" every 3 seconds 5 33
Compute age Html 2 27
Check only one toolstripmenu item 12 29
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Find out what you should include to make the best professional email signature for your organization.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

733 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