Click to See Complete Forum and Search --> : Asp problem returning data from string


jazzyj99
10-09-2006, 11:03 AM
<% dim mytitle

mytitle = "Web Developer"
%>

Problem: mytitle can be either (Web Developer, Sr. Tech Specialist, Sr. Support Specialist, Supervisor)

The following code displays only Web, Sr. or Supervisor. It stops displaying anything after a space.

CODE 1:
<input maxlength=15 size=12 value=<%=mytitle %> disabled>


This code will write out the whole title (Web Developer, Sr. Tech Specialist, Sr. Support Specialist, Supervisor) but it won't be displayed in an input box

CODE 2:
<% response.write mytitle %>


What can I do differently to get the whole title to display in my input box??

<input maxlength=15 size=12 value=<% response.write mytitle %> disabled>

vanny
10-09-2006, 07:32 PM
You need the ASP inside quotes eg

<input maxlength=15 size=12 value="<% response.write mytitle %>" disabled>

seobean
10-12-2006, 04:55 AM
Vanny provided the best answer. It is good.

http://www.softbean.com
http://www.offshorebean.com
http://www.contentbean.com
http://www.logobean.com