Web Hosting Talk







View Full Version : How to set value for field using ASP


tomasr
10-10-2007, 09:00 AM
Hi,

I am trying to set value for html input field using asp code below. Unfortunatelly asp code appears as text in browser and it does not executed by server. Any suggestion?

<input value="<% Response.Write(licSUM) %>" name="lic1" />

Regards,
Tomas

Omnibot
10-18-2007, 10:05 AM
Your code looks fine; make sure the file is named with extension of .asp and you are using Windows hosting (IIS) and not Apache.

tomasr
10-18-2007, 10:14 AM
Eveyrthing is set correct but code does not work.

It only work when I taje the whole html code into asp brackets, like this

<% Response.Write("<input value='" + licSUM + "' name='lic1' />") %>

Any clue?

under_gravity
10-23-2007, 11:17 AM
try:
<input value=<% =licSUM %> name="lic1"/>