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
Re: Writing to a asp text field
am 27.09.2007 14:17:29 von exjxw.hannivoort
=?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
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Re: Writing to a asp text field
am 27.09.2007 16:10:15 von McKirahan
"Gary" wrote in message
news:5E973187-E031-4EA5-B4D3-90113546C79E@microsoft.com...
> 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?
The page is processed on the server interpreting the ASP code
then presenting the resulting page to the client. Thus, your form
is not available "while some of the asp code is running" unless
your retrieving values via Request.Form() from the calling page.
So what are you really trying to do in more detail?
Do you need to store some hidden values in a form after
the ASP processing? If you do then consider this:
<% Const cHW = "Hello World" %>
Re: Writing to a asp text field
am 28.09.2007 17:14:20 von 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:
<%=savedData%>
The code above will not run, but it should give you an idea of what I'm
saying.
"Gary" wrote:
>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