在Visual Basic 2008中以编程方式创建aspx网页 [英] In Visual Basic 2008 create aspx web pages programmatically

查看:107
本文介绍了在Visual Basic 2008中以编程方式创建aspx网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio或者使用Expression Web。我需要

来创建大约50个aspx页面,大约1200个缩略图图像,通常是每页三到四组排列的
,具有指向
$ b的超链接$ b相应的全尺寸图片。


任何人都可以指向MSDN或其他地方的位置,提供参考

附加,命令&用于创建或打开页面的对象和

可能可用的类?


我用Excel做了相同的事情,其中​​相应的引用

workboook&工作表命令等广泛可用。


任何方向都会受到赞赏。


Peter K

解决方案

Peter K写道:


我正在使用Visual Studio或者使用Expression Web。

我需要创建大约50个aspx页面,大约1200个thumbnali

图像,通常每页排列三到四个组,具有

超链接到相应的全尺寸图像。


任何方向都将不胜感激。



如果仅仅是一个整页文件夹一页显示一页

,你应该能够这样做有两个页面:一个用于

缩略图和一个用于预览。


缩略图页面:

阅读缩略图图像文件夹的内容,并制作一个< tablefrom a

合适的数量。

包含上传/下一页链接,其中包含回发到
缩略图页面,页面编号为,用于选择要放入< table>的

给每个缩略图一个<在预览页面上,在URL中包含图像参考

,以便预览页面可以将相应的src =放在< img>

元素中。


预览页面:

从Request.QueryString获取图像的文件名(&whatever; whateverYouCalledIt")


如果要区分缩略图集,例如文件的一部分

名称,然后你可以使用相同的方法,但限制每个页面的图像与

a文件名的特定部分。

不要担心在每页

访问页面时阅读目录内容所花费的时间:操作系统将负责所需的任何缓存。


否则,你的数据来源是什么来确定哪些图片在哪个页面上进入哪个组?


Andrew


7月11日,5:47 * am,Peter K< Pet ... @ discusions.microsoft.comwrote:


我正在使用Visual Studio或者使用Expression Web。 *我需要

来创建大约50个aspx页面,大约有1200个缩略图,通常是每页三到四组排列的
,有超链接到

相应的全尺寸图片。


任何人都可以指向MSDN或其他地方的位置,提供参考

附加,命令&用于创建或打开页面的对象和

可能可用的类?


我用Excel做了相同的事情,其中​​相应的引用

workboook&工作表命令等广泛可用。


任何方向都将受到赞赏。


Peter K



我同意,我不会尝试以编程方式创建50个页面,我会

创建尽可能少的页面(例如1或2)

处理所有其他页面的内容。


谢谢,


Seth Rowe [MVP]


你的回复的Thxs。是的,我可以这样做。


但是,我的主要问题是我无法找到什么引用

附加到项目,什么对象使用等我知道如何创建一个

Excel应用程序,打开工作簿,在工作表之间移动,阅读&写在

那些页面,保存文件,关闭工作簿等等。这些是广泛的

可用。


我需要aspx网页的等效项。什么是库,我是如何创建应用程序,创建/打开页面等等。


再次,我将不胜感激任何建议那个方向。已搜索过MSDN,VB

样本等。发现与此情况无关。


Peter K


安德鲁莫顿写道:


Peter K写道:


我正在使用Visual Studio或者使用Expression Web。

我需要创建大约50个aspx页面,大约1200个缩略图

图像,通常每页排列三到四组,具有

超链接相应的全尺寸图像。


任何方向都将不胜感激。



如果只是一个整页文件夹一页显示一页

一次,你应该能够这样做有两个页面:一个用于

缩略图和一个用于预览。


缩略图页面:

阅读缩略图图像文件夹的内容,并制作一个< tablefrom a

合适的数量。

包含上传/下一页链接,其中包含回发到
缩略图页面,页面编号为,用于选择要放入< table>的

给每个缩略图一个<在预览页面上,在URL中包含图像参考

,以便预览页面可以将相应的src =放在< img>

元素中。


预览页面:

从Request.QueryString获取图像的文件名(&whatever; whateverYouCalledIt")


如果要通过以下方式区分缩略图组,例如: 。G。文件的一部分

名称,然后你可以使用相同的方法,但限制每个页面的图像与

a文件名的特定部分。

不要担心在每页

访问页面时阅读目录内容所花费的时间:操作系统将负责所需的任何缓存。


否则,你的数据来源是什么来确定哪些图片在哪个页面上进入哪个组?


Andrew


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 & worksheet commands, etc, are widely available.

Any direction would be appreciated.

Peter K

解决方案

Peter K 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.

Any direction would be appreciated.

If it''s just a case of presenting an entire folder full of images one page
at a time, you should be able to do that with two pages: one for the
thumbnails and one for the preview.

Thumbnails page:
Read the content of the thumbnail images folder and make a <tablefrom a
suitable number of them.
Include prev/next page links which have URLs which post back to the
thumbnail page with the page number in, for choosing which set of thumbnails
to put in the <table>
Give each thumbnail an <ato the preview page, include the image reference
in the URL so the preview page can put the appropriate src= in the <img>
element.

Preview page:
Get the image''s filename from Request.QueryString("whateverYouCalledIt")

If the sets of thumbnails are to be distinguished by, e.g. part of the file
name, then you can use the same approach but limit each page to images with
a particular part of the file name.

Don''t worry about the time taken to read the directory contents on every
access of the page: the OS will take care of any caching needed.

Otherwise, what is your data source for determining which images go in which
groups on which pages?

Andrew


On Jul 11, 5:47*am, Peter K <Pet...@discusions.microsoft.comwrote:

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 & worksheet 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]


Thxs for your reply. Yes, I could do it that way.

However,my main problem is that I cannot find anywhere what references to
attach to the project, what objects to use, etc. I know how to create an
Excel application, open a workbook, move between work sheets, read & write in
those pages, save the file, close the workbook, etc. These are widely
available.

I need the equivalent items for aspx web pages. What are the libraries, how
do I create the application, create/open a page, etc.

Again, I''d appreciate any advise in that direction. Have searched MSDN, VB
samples, etc. Found nothing relevant to that situation.

Peter K

"Andrew Morton" wrote:

Peter K 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.

Any direction would be appreciated.


If it''s just a case of presenting an entire folder full of images one page
at a time, you should be able to do that with two pages: one for the
thumbnails and one for the preview.

Thumbnails page:
Read the content of the thumbnail images folder and make a <tablefrom a
suitable number of them.
Include prev/next page links which have URLs which post back to the
thumbnail page with the page number in, for choosing which set of thumbnails
to put in the <table>
Give each thumbnail an <ato the preview page, include the image reference
in the URL so the preview page can put the appropriate src= in the <img>
element.

Preview page:
Get the image''s filename from Request.QueryString("whateverYouCalledIt")

If the sets of thumbnails are to be distinguished by, e.g. part of the file
name, then you can use the same approach but limit each page to images with
a particular part of the file name.

Don''t worry about the time taken to read the directory contents on every
access of the page: the OS will take care of any caching needed.

Otherwise, what is your data source for determining which images go in which
groups on which pages?

Andrew


这篇关于在Visual Basic 2008中以编程方式创建aspx网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆