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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How did that thing work again??

Status
Not open for further replies.

Pandyon

Programmer
Feb 21, 2001
38
US
Saw this somewhere else, but can't seem to search properly for it. Really simple..I think. So little help, please.

When I set the default value in an input box on a form from a variable, I'm not getting the full text in the variable. In input box is &quot;value=<%=vbAudCompany%>&quot;, and in this case, let's say vbAudCompany = &quot;Matchstick Makers&quot;

All I get is &quot;Matchstick&quot; No, &quot;Makers&quot;...
Anybody know the fix for this? Why it's stopping at the first &quot;space&quot;???

Thanks,

pandyon
 
Off the top of my head, I think you want Value=&quot;&quot;<%=vbAudCompany%>&quot;&quot; beacuse of the embedded space. It has been a year or so since I did any ASP. Anyway, doubled-up double quotes are rhe answer. If you were doing RESPONSE.WRITE instead of embedded HTML with <%=vbAudCompany%> it would be
Code:
RESPONSE.WRITE &quot;value=&quot;&quot;&quot; & vbAudCompany & &quot;&quot;&quot;&quot;
 
value=&quot;<%=vbAudCompany%>&quot;

if you use response.write, you should double them up, but if you aren't, you don't have to -- you just had them in the wrong spot... they come after value, not before.

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top