Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textbox Question 2

Status
Not open for further replies.

sdand

IS-IT--Management
Oct 11, 2000
14
US
I have a question about a textbox problem I am having inside of an ASP page. I am currently writing a page to update an employee record, stored on SQL Server. When I assign the employee name recordset value to the textbox, it only displays text before a space. For example: the value in my database is John Doe, however, after assigning the recordset object to the text box, it only displays John.

My code is as follows:

Response.Write objRS("Name") - Which displays "John Doe" (Used for debugging)

<input name=&quot;txtName&quot; maxLength=&quot;50&quot; size=&quot;50&quot; value=<%= objRS.Fields(&quot;Name&quot;)%> --> Which displays &quot;John&quot;

Any help you could provide, would be appreciated.

Scott
 
Try adjusting your code to add in a set of quotes

value=<%=&quot;'&quot; &amp; objRS.Fields(&quot;Name&quot;) &amp; &quot;'&quot;%>

A double quote a single quote and another double quote before and after your objRS

Walter III

Walt III
SAElukewl@netscape.net
 
<input type=&quot;Text&quot; name=&quot;txtName&quot; maxLength=&quot;50&quot; size=&quot;50&quot; value=&quot;<%=objRS.Fields(&quot;Name&quot;)%>&quot;>

would also work.

Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top