•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 392,065 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,281 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 1845 | Replies: 5
![]() |
•
•
Join Date: Mar 2005
Location: LTT, South Africa
Posts: 125
Reputation:
Rep Power: 4
Solved Threads: 1
hi
i have a page that generates asp code as text.
this all works well, but i need the same page to take the generated code and use it as asp again. is this even possible?
<% VARdate = "date()"
' now to use the VARdate
response.write(VARdate) %>
this is just an example. the code im working with checks to see what tables are available from a mysql database, runs an explain on them (to see what columns there are) then it runs a recordset outputing the data of those columns.
im trying to create a way of backing up a database with JUST asp.
if i could only get asp to read code thats in "text" as asp code, im sure it would work. cause if i take the generated code on IE. place it in an asp document it works fine.
PLEASE SAY ITS POSSIBLE and how to go about it
i have a page that generates asp code as text.
this all works well, but i need the same page to take the generated code and use it as asp again. is this even possible?
<% VARdate = "date()"
' now to use the VARdate
response.write(VARdate) %>
this is just an example. the code im working with checks to see what tables are available from a mysql database, runs an explain on them (to see what columns there are) then it runs a recordset outputing the data of those columns.
im trying to create a way of backing up a database with JUST asp.
if i could only get asp to read code thats in "text" as asp code, im sure it would work. cause if i take the generated code on IE. place it in an asp document it works fine.
PLEASE SAY ITS POSSIBLE and how to go about it
•
•
Join Date: Jul 2004
Location: Sydney, Australia
Posts: 166
Reputation:
Rep Power: 5
Solved Threads: 7
Re: asp code generated as text, needed to be seen as asp code again. databses backup
#2
Jan 11th, 2006
There are two ways to go about this, if I understand what you are trying to do correctly.
The first would be to create a file from the generated 'text', and save it as an asp file. That code in that file could then be included/executed from a subsequent page.
The second, and probably cleaner method, is to use the variables created in the 'text' in later code. A simple combination of check routines and loops should do the trick.
The first would be to create a file from the generated 'text', and save it as an asp file. That code in that file could then be included/executed from a subsequent page.
The second, and probably cleaner method, is to use the variables created in the 'text' in later code. A simple combination of check routines and loops should do the trick.
If I've been a help please confirm by clicking the Add to Lafinboy's Reputation link in the header of this reply.
Lafinboy Productions
:: Website Design :: Website Development ::
Lafinboy Productions
:: Website Design :: Website Development ::
•
•
Join Date: Mar 2005
Location: LTT, South Africa
Posts: 125
Reputation:
Rep Power: 4
Solved Threads: 1
Re: asp code generated as text, needed to be seen as asp code again. databses backup
#3
Jan 11th, 2006
"A simple combination of check routines and loops should do the trick."
how????? ive started with the generate asp pages of code then execute but idealy i want it to out pu the whole thing to a text file so that goes out the window.
basicaly i want a asp variable thats in text
var = "date()" to be later on read as date(), asp code, this is just an example
how????? ive started with the generate asp pages of code then execute but idealy i want it to out pu the whole thing to a text file so that goes out the window.
basicaly i want a asp variable thats in text
var = "date()" to be later on read as date(), asp code, this is just an example
•
•
Join Date: Apr 2004
Location: Springfield, Oregon
Posts: 119
Reputation:
Rep Power: 5
Solved Threads: 6
Re: asp code generated as text, needed to be seen as asp code again. databses backup
#4
Jan 20th, 2006
I think i know the solution for you.
Try using the Server.Execute method.
Try using the Server.Execute method.
<% VARdate = "date()" ' now to use the VARdate response.write(Server.Execute(VARdate)) %>
•
•
Join Date: Mar 2005
Location: LTT, South Africa
Posts: 125
Reputation:
Rep Power: 4
Solved Threads: 1
Re: asp code generated as text, needed to be seen as asp code again. databses backup
#5
Jan 24th, 2006
server.execute doesnt work. what does work (compliments of "vbs in a nutshell") is
as i understand it executing "s" only uses the code that "s" is linked to, the variable "s" does nothing. once you have executed then you still have to do something with it. in this case call the sub.
i havent tried this in my case yet, havent had the time yet. will do so soon i hope.
dim S S = "sub Proc2 : " S = S & "dim x : " S = S & "x = 10 : " S = S & "MsgBox x : " S = S & "End Sub " Execute S Proc2
as i understand it executing "s" only uses the code that "s" is linked to, the variable "s" does nothing. once you have executed then you still have to do something with it. in this case call the sub.
i havent tried this in my case yet, havent had the time yet. will do so soon i hope.
•
•
Join Date: Apr 2004
Location: Springfield, Oregon
Posts: 119
Reputation:
Rep Power: 5
Solved Threads: 6
Re: asp code generated as text, needed to be seen as asp code again. databses backup
#6
Jan 24th, 2006
Sorry my bad... "Execute" is what i meant to say, not "Server.Execute". I posted really late and was really tired. I just wasnt thinking very clear :s
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP Marketplace
•
•
•
•
.net access activation ads adsense ajax api asp backup blogger blogging blogs code custom dani daniweb data database debugging developer development dropdownlist gdata google gpl innovation key link linux microsoft msdn news office product programming revenue rss serial server skin software source sql tags text theme unit vista xml
- IIS 5.1 Windows XP & ASP code (Windows Servers and IIS)
- windows code generated (VB.NET)
- How would I write this asp code to work in PHP (PHP)
- ASP Code Works on Local 127.0.0.1 but Not on ISP's Server (ASP)
Other Threads in the ASP Forum
- Previous Thread: Accessing ADSI Query from ASP page
- Next Thread: Designing an Intranet using ASP


Linear Mode