473,785 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

serving pages in ASP ala PHP

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
3 2216
You can Server.Execute the pages.

Ray at home

"-[ CaMeL ]- a55m0nk" <ja************ ****@hotmail.co m> wrote in message
news:dc******** *************** ***@posting.goo gle.com...
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
"Ray at <%=sLocation% >" <myfirstname at lane 34 . komm> wrote in message news:<#n******* *******@TK2MSFT NGP12.phx.gbl>. ..
You can Server.Execute the pages.

Ray at home

"-[ CaMeL ]- a55m0nk" <ja************ ****@hotmail.co m> wrote in message
news:dc******** *************** ***@posting.goo gle.com...
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.queryst ring("id")
if strPage = "" then
strPage = "1"
end if

strPageSQL = "SELECT pageBody FROM tblPage WHERE pageID = " & strPage
& ""
Set strPageConn = Server.CreateOb ject("ADODB.Rec ordset")
strPageConn.Ope n strPageSQL, "CaMeL", 3, 3

strBody = strPageConn("pa geBody")

strPageConn.clo se
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
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.co m> wrote in message
news:dc******** *************** ***@posting.goo gle.com...

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

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

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

strPageSQL = "SELECT pageBody FROM tblPage WHERE pageID = " & strPage
& ""
Set strPageConn = Server.CreateOb ject("ADODB.Rec ordset")
strPageConn.Ope n strPageSQL, "CaMeL", 3, 3

strBody = strPageConn("pa geBody")

strPageConn.clo se
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1509
by: Geoff Winsor | last post by:
Hi, I just finished migrating our web site to Windows server 2003 from Windows 2000. It consists of a mix of static html and .asp pages that mostly connect to MS access databases on the back end. Before going live with the changes, everything worked very well. After going public, IIS 6.0 continues to serve the static html pages with no problem but chokes on the ASP pages (however not timing out), even though the web traffic is not high...
5
2037
by: Alan | last post by:
I have a website with no ssi, php, cgi...nothing. Plain old flat pages are all it serves. I need to upload a list to it - a big, plain text list in html. A 2Mb list! With gzip compress, it comes down to 91Kb, much more modem-friendly! After about 30 minutes of googling, I haven't yet found a way of serving this page up like this. I can't send headers as no php or .htaccess is allowed. Any ideas?
1
1905
by: cwdjrxyz | last post by:
I am now writing many new pages in xhtml 1.1. They are served as true xhtml by setting the mime type of the server to application/xhtml+xml for the .xhtml extension. Since IE6 and some earlier browsers can not handle this mime type, a simple php include is at the very top of such pages. If the mentioned mime type support for the viewing browser is detected, everything above the head tag of the page is written in xhtml 1.1 code. If the...
0
5063
by: jack | last post by:
I am getting this error on my web server runnint ASP.NET on Windows 2003, it kills the serving web pages. The only way to get the web pages to start serving is to restart the server. I can't find what is causing this. Any Help would be great!!! Event Type: Warning Event Source: W3SVC Event Category: None Event ID: 1012
4
2904
by: Frankie | last post by:
I'm writing a small C# utility application that creates new Web Sites via ADSI. It seems to work just fine for the most part -- meaning that IIS Metabase entries look either identical or "different where expected" - when comparing Web Sites created with my utility against Web Sites created "manually" with IIS Manager. I'm comparing the sites visually (eye balling it) with Metabase Explorer. The problem I have with Web Sites created with...
1
3432
by: Ben | last post by:
Hi there, Perhaps someone can help me. For some reason, when my Python script runs and loads an HTML page in a new browser window at the local host (desktop), the links to my stylesheet and all the images are broken. I did check the HTML file by itself...everything loaded fine ;) Here's my script: -------------------- # File: webbrowser-test.py
2
1686
by: Jim Stools | last post by:
Server 2000 IIS 5 The server stopped serving pages on all the web sites: The Following error message: The page cannot be found HTTP 404 - File not found Internet Information Services
9
1360
by: -Lost | last post by:
In Firefox and Safari for example, if I serve my XHTML documents as application/xml or xhtml+xml they only display the top inch or so of the document. In Opera it says "object has been blocked." In Internet Explorer of course you get total rubbish. Anything from "page cannot be loaded" to "403 no permission." The thing is, I figured the first two at least could handle it, maybe
2
1284
by: plenty900 | last post by:
Hi folks, If 2 copies of Apache are serving the same pages and running the same PHP, what if anything could get messed up? I am specifically thinking session variables might, but I know I don't know... so anybody know? Thanks.
0
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10315
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5379
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.