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!

Response.Write stops at a space 1

Status
Not open for further replies.

jon24422531

Technical User
Jan 27, 2004
295
GB
Hi everyone

I am returning some data from a SQL table (of our Users) to a web form and it is all going well except for when I return any spaces:

This is the data:
Code:
rsData.Open strSQL, MyConn
Returns = rsData.GetRows(1,0)
This is where the data is going:
Code:
    <tr>
      <td style="width: 101px;">Name</td>
      <td style="width: 263px;"><input type="text" name="UserName" value=<%Response.Write(Returns(1,0))%>></td>
But it just puts the first name ( Joe ) and then ceases at the space.

If I just put this code at the bottom I get the correct name with spaces etc
Code:
Name : <%Response.Write(Returns(1,0))%>
Name : Joe The Plumber

I assume this is something to do with the input box, but I am not sure what.

Any help greatly appreciated

Jonathan
 
you can just simply put:
x = Returns(1,0)
<input type="text" name="UserName" value="<%=x%>">
 
wvdba

Thanks for you prompt response, and I have just tried it out but the result is still the same, it is 'breaking' at the space. The rest of the code and the data is correct (although that portion is the only data with spaces in).

Is it a limitation of input boxes?

Jonathan
 
<td style="width: 263px;"><input type="text" name="UserName" value=<%Response.Write(Returns(1,0))%>></td>
[tt]<td style="width: 263px;"><input type="text" name="UserName" value=[highlight]"[/highlight]<%Response.Write(Returns(1,0))%>[highlight]"[/highlight]></td>[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top