serving pages in ASP ala PHP

  • Thread starter -[ CaMeL ]- a55m0nk
  • Start date
C

-[ CaMeL ]- a55m0nk

Hi there

i am creating a clan website in ASP and am making a page serving
script

a link sends a query to the default page and then serves the page by
grabbing the HTML from a database that refers to the pageID.

this works like a peach whenever the page is just HTML
e.g. http://www.deathworld.net/camel2.0/default.asp?id=2

but when i try and add ASP code to it (for a news page etc), it just
prints the ASP and does not execute it
e.g. http://www.deathworld.net/camel2.0/default.asp?id=1

Any ideas on how to do this would be much appreciated. is there a way
of doing it this way? or is there a work-around without a huge
default.asp file size?

many thanks
a55m0nk
(jack bastow)
 
C

-[ CaMeL ]- a55m0nk

Ray at said:
You can Server.Execute the pages.

Ray at home

-[ CaMeL ]- a55m0nk said:
Hi there

i am creating a clan website in ASP and am making a page serving
script

a link sends a query to the default page and then serves the page by
grabbing the HTML from a database that refers to the pageID.

this works like a peach whenever the page is just HTML
e.g. http://www.deathworld.net/camel2.0/default.asp?id=2

but when i try and add ASP code to it (for a news page etc), it just
prints the ASP and does not execute it
e.g. http://www.deathworld.net/camel2.0/default.asp?id=1

Any ideas on how to do this would be much appreciated. is there a way
of doing it this way? or is there a work-around without a huge
default.asp file size?

many thanks
a55m0nk
(jack bastow)

how would i go about doing that? here is my code:

'----------Page Serving Code-----------'
dim strPageSQL, strPageConn, strBody

strPage = request.querystring("id")
if strPage = "" then
strPage = "1"
end if

strPageSQL = "SELECT pageBody FROM tblPage WHERE pageID = " & strPage
& ""
Set strPageConn = Server.CreateObject("ADODB.Recordset")
strPageConn.Open strPageSQL, "CaMeL", 3, 3

strBody = strPageConn("pageBody")

strPageConn.close
set strPageConn = nothing
set strPageSQL = nothing
'--------------------------------------

then i do <%=strBody%> in the section it is required. How could i do a
server.execute for this script?

thanks
a55m0nk
(jack bastow)
 
R

Ray at

Ah, so you're storing actual asp code in your database, eh? Nice. You
could try playing around with the Eval function and/or the Execute
statement.

Ray at work
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top