Writing to a asp text field

G

Gary

I hope I can explain this. I have an asp form that uploads files from the
user computer to a server. I want to save some data to some hidden text
controls while some of the asp code is running. However, I can't seem to
figure out how to referece the control. I tried using
document.formname.controlname.value but I get an error that document doesn't
exist. How do I reference a control from asp?

Gary
 
E

Evertjan.

=?Utf-8?B?R2FyeQ==?= wrote on 27 sep 2007 in
microsoft.public.inetserver.asp.general:
I hope I can explain this. I have an asp form that uploads files from
the user computer to a server. I want to save some data to some
hidden text controls while some of the asp code is running. However,
I can't seem to figure out how to referece the control. I tried using
document.formname.controlname.value but I get an error that document
doesn't exist. How do I reference a control from asp?

Classic asp has no forms,
since it only exists and executes on the server,
while document.formname.controlname.value
is a clientside [document!] thing,
no ASP involved.

Better ask in a clientside NG.

Perhaps your Q is about asp.net?

This is a classic asp group.
Dotnet questions c/should be asked in
<microsoft.public.dotnet.framework.aspnet>
 
J

jp2code

Gary,

Do something like this:

For the field you want to capture:
Dim savedData
savedData = Request.Form("txtDataToSave")
' save your data to your server or whatever
' exit your script
' begin your HTML body:
<body>
<input type="hidden"><%=savedData%></input>

The code above will not run, but it should give you an idea of what I'm
saying.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top