If statement cutting off data

T

Targa

Im using the following If statement to display a textbox containing the
company name if the client is listed as Commercial.

<% If rs("Client_Type") = "Commercial" then response.write
"<input type='textbox' name='Company' size='30' value=" & rs("CompanyName")
& "><BR>" End If %>

The problem is it cuts off the company name data if there is more than one
word in the name.

If the company name is "Some Company", this will display "Some"
but "<input type="textbox" value="<% = rs("CompanyName") %>"> displays fine
as "Some Company"

What am I doing wrong here?

Thanks!
 
T

Thomas A. Rowe

Try:

<% If rs("Client_Type") = "Commercial" Then %>
<input type="text" name="Company" size="30" value="<%=rs("CompanyName")%>"><br>
<% End If %>


--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
T

Thomas A. Rowe

You are welcome.

I always try to avoid using "Response.Write" statements, unless absolutely necessary.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
Top