a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions. dd

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Load page into a variable

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Load page into a variable
Page: [1]
 
helensnow

 

Posts: 228
Joined: 12/18/2003
Status: offline

 
Load page into a variable - 9/30/2006 12:35:45   
hi

could not find answer in archieves..

I want to load a webpage with the usual www.xyz.com?record=2

and get the resultant webpage into a variable

This was the elected solution by someone, but I have idea how to do this, the idea is to then do extensive processing etc on this database record, it is an old legacy system.

I guess it is like a file upload but on the server side, so it is not really an upload, sort of a file cross load

Any ideas?

I am stumped

< Message edited by helensnow -- 9/30/2006 12:48:41 >


_____________________________

Love is all, and all that we are is love
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: Load page into a variable - 9/30/2006 22:33:18   
quote:

and get the resultant webpage into a variable


You want the whole page as a string in a variable? Something like this?

<%DIM myString
myString = ""
myString = myString & "<html>" & VbCrLf
myString = myString & "<head><title>My Page</title></head>" & VbcrLf
....
....
myString = myString & "</html>"%>

Is that what you mean?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to helensnow)
helensnow

 

Posts: 228
Joined: 12/18/2003
Status: offline

 
RE: Load page into a variable - 10/1/2006 8:59:51   
Hi
let me clarify it a bit more, sorry for the confusion

Normally I would do this
http://www.example.com/pages.asp?retrieve=filecode

and it will display a HTML page on screen

QUESTION?


How do i redirect the output so it does not display on screen, but redirects the output to MyString

I can then do a replace string on various bits of MyString
and then save this modified string as a standard html file

And it is in old fashioned ASP



_____________________________

Love is all, and all that we are is love

(in reply to rdouglass)
Spooky

 

Posts: 26617
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Load page into a variable - 10/1/2006 14:34:44   
What does "retrieve=filecode" actually do on that first page?
Does it load values from a database or what does "retrieve" get used for?

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to helensnow)
helensnow

 

Posts: 228
Joined: 12/18/2003
Status: offline

 
RE: Load page into a variable - 10/1/2006 14:45:40   
Hi
That was a poor example

Assume that I am querying a database from ASP like this

http://www.example.com/page.asp?id=10


This query then returns a standard webpage

I want to redirect that output which will normally display a webpage, into a ASP variable insted.









_____________________________

Love is all, and all that we are is love

(in reply to Spooky)
Spooky

 

Posts: 26617
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Load page into a variable - 10/1/2006 14:56:41   
quote:

"This query then returns a standard webpage "


The "id" (whatever its called) will normally be used to dynamically change the output of the page

quote:

"This query then returns a standard webpage "


Does the original page (eg browse to "page.asp" ) return a normal asp page ? or does it need the "id"? What does the "id" do?

What Im getting at, is you can do it like Roger suggested, however if the data is being pulled from a database, I cant yet see what you are trying to achieve?

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to helensnow)
helensnow

 

Posts: 228
Joined: 12/18/2003
Status: offline

 
RE: Load page into a variable - 10/1/2006 15:04:11   
Ok, I understand, the data is dynamic and the id refers to old and also new and changing content, so it has to be specified

the database has a large volume of webpages which were created for a journal,

these now need to be retrieved from the database, updated (replace string stuff) and then written to a directory as a large collection of HTML pages with the new and updated information in them.

So I want to do this automatically as there are 850 odd pages

_____________________________

Love is all, and all that we are is love

(in reply to Spooky)
helensnow

 

Posts: 228
Joined: 12/18/2003
Status: offline

 
RE: Load page into a variable - 10/1/2006 16:25:09   
When I said I understand,

I DO NOT UNDERSTAND HOW TO SOLVE IT!

I just undersand the question that Sheep asked, any help would be deeply appreciated from anyone as Sheep is now offline :(

_____________________________

Love is all, and all that we are is love

(in reply to helensnow)
Spooky

 

Posts: 26617
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Load page into a variable - 10/1/2006 16:42:52   
To clarify (I think I understand) - you want to extract what is a currently database driven site and make it into a static html only site?
WHY OH WHY!! :)
Wouldnt it be best to leave it dynamic and just update the database content?

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to helensnow)
helensnow

 

Posts: 228
Joined: 12/18/2003
Status: offline

 
RE: Load page into a variable - 10/1/2006 16:47:42   
hi,
I know it sounds crazy, this is not my decision, and there are reasons for this at present that I cannot share right now, I've been asked not to say anything and I am bound by this 'NDA'




_____________________________

Love is all, and all that we are is love

(in reply to Spooky)
Spooky

 

Posts: 26617
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Load page into a variable - 10/1/2006 16:56:13   
Whatever happens - you have to manually modify the page content to update it?
Is the content you would need to update :

a) from the database
b) the static content from "page.asp"
c) both

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to helensnow)
helensnow

 

Posts: 228
Joined: 12/18/2003
Status: offline

 
RE: Load page into a variable - 10/1/2006 17:16:01   
Hi
The content is from a database accessed from an ASP page, so the answer is (C)

I wanted to redirect the output into a ASP variable then I can do a Replace string function as all the structures are easy to find and replace, so that was there would be no manual involvement

I appreciate your help
Helen

_____________________________

Love is all, and all that we are is love

(in reply to Spooky)
Spooky

 

Posts: 26617
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Load page into a variable - 10/1/2006 17:34:43   
Someone may have some other ideas on how to extract that data .
It can be done, but the code required to do it via asp could take longer to write than actually do it manually ;-)

I would modify page.asp (the template) so that it has correct design to start with.
This would be the major part of the work?
When you say the information is easily changed using "find and replace", do you mean content that already exists in 'page.asp' or do you mean you need to find and replace from the database data?

Perhaps someone else has some other ideas? but in the first instance, I wouldnt like to see it changed from dynamic
Second choice would be some batch method and 3rd choice, do a "save as html" from the browser

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to helensnow)
helensnow

 

Posts: 228
Joined: 12/18/2003
Status: offline

 
RE: Load page into a variable - 10/1/2006 18:02:50   
Thanks Spooky,

SO I am being simplistic in thinking that there is some kind of >> to redirect the output to a file like in good old dos, then I could read that file and do a replace string and that would be it.

The thing is that there is old data in there which is teh bulk of the work, I can take care of the new data with a proper template

_____________________________

Love is all, and all that we are is love

(in reply to Spooky)
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: Load page into a variable - 10/1/2006 20:58:27   
Sorry, I stepped away for a minute....

quote:

How do i redirect the output so it does not display on screen, but redirects the output to MyString


Did you see my first post? That's exactly what I was doing; putting an HTML page into a variable.

(or was all that NDA stuff clouding your vision.:) ) (sorry...:))

Anyways, I have been sucessful in retrieving any web page content using a WebClient class in ASP.NET. Have you any experience with that?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to helensnow)
helensnow

 

Posts: 228
Joined: 12/18/2003
Status: offline

 
RE: Load page into a variable - 10/1/2006 22:01:54   
Hi,

This project unfortunately has to be done with ASP only not .NET thy do not want to mix it.

I looked at your codeing, but I cannot underatnd how you are retrieving the web page content into a variable... :(



_____________________________

Love is all, and all that we are is love

(in reply to rdouglass)
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: Load page into a variable - 10/1/2006 23:00:40   
quote:

you are retrieving the web page


Well, I *know* I'm lost. I thought you were generating the page on your own site. So you are grabbing another page from another host?

But you said this here:

quote:

to redirect the output to a file


Maybe you could clarify? Are you making the page somewhere? Where does the page come from? Is it coming from a site you can put code on?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to helensnow)
Spooky

 

Posts: 26617
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Load page into a variable - 10/2/2006 0:16:12   
From what I understand, we already have a dynamic site created from a database

eg :
http://www.example.com/page.asp?id=10

There are up to 850 'pages' that could be dynamically created with the one template page.
What she wants, is to create 850 static pages (automatically)

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to rdouglass)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> ASP and Database >> Load page into a variable
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts