Re: In Visual Basic 2008 create aspx web pages programmatically



On Jul 11, 12:03 pm, Peter K <Pet...@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Thxs for your reply.

I'm not quite sure what you mean by creating 'one or two pages that could
handle the contents of all the other pages'.  There are 1200 image addresses
& 1200 thumbnail addresses (available in a sread*** as well as in an SQL
database)  & they all have to be put onto web pages.  That's not a job to do
one by one.

I wrote a program to create the folders & place the images into the folders,
another one to create the thumbnails, also placed into the set of folders..  
All those things are well available & documented in MSDN & in many other
places.

However, for creating aspx web pages I have not been able to find the
equivalent info, which references/libraries to attach to the project, what
objects to use to define the application & to create/open pages, & write to
them.

I'd appreciate any help in that direction.

Peter K

What I cannnot find is what

"rowe_newsgroups" wrote:
On Jul 11, 5:47 am, Peter K <Pet...@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I am working with Visual Studio or alternately with Expression Web.  I need
to create about 50 aspx pages with about 1200 thumbnali images, typically
arranged in three to four groups per page, having hyperlinks to the
corresponding full size images.

Can anybody point me to locations in MSDN or elsewhere giving the references
to attach, the commands & objects for creating or opening the pages and
possibly available classes?

I have done equivalent things with Excel where the corresponding references
workboook & work*** commands, etc, are widely available.

Any direction would be appreciated.

Peter K

I agree, I wouldn't try to programmatically create 50 pages, I'd
create as few of pages as possible pages (say 1 or 2) that could
handle the content of all the other pages.

Thanks,

Seth Rowe [MVP]

Are you saying you want to create a page for each image? If so, I
don't see any reason to use aspx pages, you can simply use html pages
that just have image tags in the content. You could write a simple
console application that went through the images, created a file
stream, and then outputted the html text to the file.

My personal preference would be to create a page that takes a
parameter, say from the query string, and use it to retrieve the image
from the database and display it. I'm guessing the fields in the Sql
database have a unique identifier (say an int primary key) - that's
what I would pass in through the query string. ASP.NET has an image
control that you could change the ImageUrl property during init or
load based on the query string. For the thumbnails, you could simply
have a collection of ASP.NET image button controls that redirect to
the large image (passing in the correct query string parameters).
These controls should be built dynamically and the page should be
cached for performance.

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/
.


Loading