Words after space don't appear in form init value (1 Viewer)

SteveClarkson

Registered User.
Local time
Today, 14:03
Joined
Feb 1, 2003
Messages
439
Hello,

Apologies if this is a very simple problem - but it's got me foxed! I am VERY new to ASP webpage development, learning as I go.

I have a webpage that retrieves user details from an access database on the web server.

What I want to do, is for the currently saved user details (e.g. Full Name) to appear in a form, so the user can change their name if desired, and then write it back up to the database.

I think I have all the code right to do it - but when I am populating the form with the data from the database, it appears not to be able to cope with spaces in the data.

For example, if I put:
Code:
<%=rstSimple.Fields("CustomerName").Value %>
In the body of the page somewhere, it will correctly return "John Smith".

However, when I put it in the form, like this:
Code:
<input name="name" type="text" value=<%=rstSimple.Fields("CustomerName").Value %>>
The only info I get in the form is "John".

What am I doing wrong? Is it something to do with quote marks? I've tried fiddling with them, but only further confused myself!!!


Thanks SO much!
 

SteveClarkson

Registered User.
Local time
Today, 14:03
Joined
Feb 1, 2003
Messages
439
Bingo! :D

Got there in the end!

For anyone else who may look this up one day in the future, it was as simple as the fact that the bit of code in the VALUE attribute in the form needed quotes around it, like so:

Code:
<input name="FullName" type="text" value="<%=rstSimple.Fields("CustomerName").Value %>">

:D :D :D
 

Users who are viewing this thread

Top Bottom