Go Back   Access World Forums > Apps and Windows > Web Design and Development > ASP and ASP.NET

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 06-13-2011, 03:20 PM   #1
SteveClarkson
Newly Registered User
 
Join Date: Feb 2003
Location: Kent, SE UK
Posts: 435
Thanks: 0
Thanked 2 Times in 2 Posts
SteveClarkson is on a distinguished road
Words after space don't appear in form init value

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!

__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Steve
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
SteveClarkson is offline   Reply With Quote
Old 06-16-2011, 03:32 PM   #2
SteveClarkson
Newly Registered User
 
Join Date: Feb 2003
Location: Kent, SE UK
Posts: 435
Thanks: 0
Thanked 2 Times in 2 Posts
SteveClarkson is on a distinguished road
Re: Words after space don't appear in form init value

Bingo!

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 %>">
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Steve
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
SteveClarkson is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I select N words from a string of words? David Anderson Modules & VBA 27 03-08-2010 07:46 AM
Highlighting certain words in a form timark Forms 2 02-17-2010 10:05 AM
Trim Space If A Space Exists At Start CharlesWhiteman Modules & VBA 6 04-27-2008 05:03 AM
how to split out all words in fields with multiple words joe789 Queries 1 08-08-2006 11:43 AM
init table values & reset values stormin_norm Forms 0 01-03-2004 11:03 AM




All times are GMT -8. The time now is 06:15 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post

Is Political Correctness Toxic?

Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World