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 doesn't completly show in input type 1

Status
Not open for further replies.

PNorman

Programmer
Feb 7, 2005
30
US
Fairly new here so please bear that in mind....

I have a session variable I carry from one page to another and want that value to show in the text box of an html input.

I've already tried debugging it and I know the value DOES carry over. I use Response.Write to display the value befoe using it in the input.

The text box shows for one word variables but not when the variable is more than one word. For instance if the variable is Joe it works, however, if it's Joe Smith it only shows Joe.

Here's some code:
Code:
<% sSavedVar = Session("CurrentVar")
Response.Write(sSavedVar)%> [COLOR=red]Displays correctly regardless of the amount of words[/color]

<form action="InsertInfo.asp" method=POST>
<table border="0">
<tr>
Add a new CD
</tr>
<tr>
Name: 
<input type="text" id="idArtist" name="Name" value=<% Response.Write(sSavedVar)%> > [COLOR=red] only shows the first word when multiple words are to be displayed.[/color]
</tr>   
<tr>
Title: 
<input type="text" name="Title" size="40">
</tr>
<br>
<tr>
<input type=submit value="Add">
</tr>
</table>
</form>

Any help would be greatly appreciated.
 
i mean try something like this:
value=[red]"<%=sSavedVar%>"[/red]

-DNG
 
That did it! Thank you very much.

I had considered that but I assumed it would just print everything inside the quotes. That's what I get for assuming.

Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top