I have an asp file that I need to extract all the names of controls/fields on the form. i.e. name="address1" I need the address1 pulled out and put in a text file.
Use the Request object to get the value, after you submit the page. Then if you want to do a text file on the client side, I don't think you can. But to create a text file on the server, using VB 6, open a new ActiveX DLL. Then name the project WriteFile and the class module Writer. (You can change the names as long as you do so consistently through this example. Inside the class module, add this code:
Code:
Public Sub Write(byval sTextToWrite as String)
Open "C:\MyText.txt" For Output as #1
Print #1, sTextToWrite
Close #1
End Sub
Save it, and select Make executable from the file menu. copy the WriteFile.dll to the server, and register it by going to Start|Run and typing "Regsvr32 (pathtodll)\WriteFile.dll"
Then add this code to your ASP page:
Dim X
Set X = Server.CreateObject("WriteFile.Writer"
X.Write Request("name" ' or other form name
Set X = Nothing
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.