By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,107 Members | 1,180 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,107 IT Pros & Developers. It's quick & easy.

serving pages in ASP ala PHP

P: n/a
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)
Jul 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
You can Server.Execute the pages.

Ray at home

"-[ CaMeL ]- a55m0nk" <ja****************@hotmail.com> wrote in message
news:dc**************************@posting.google.c om...
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)

Jul 19 '05 #2

P: n/a
"Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in message news:<#n**************@TK2MSFTNGP12.phx.gbl>...
You can Server.Execute the pages.

Ray at home

"-[ CaMeL ]- a55m0nk" <ja****************@hotmail.com> wrote in message
news:dc**************************@posting.google.c om...
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)
Jul 19 '05 #3

P: n/a
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
"-[ CaMeL ]- a55m0nk" <ja****************@hotmail.com> wrote in message
news:dc**************************@posting.google.c om...

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)

Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.