将所有页面读入解决方案资源管理器 [英] read all pages into solution explorer

查看:70
本文介绍了将所有页面读入解决方案资源管理器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

如何将所有页面从我的解决方案找到的列表中获取所有列表?

hi all

how can get all pages into list from that found into my solution

推荐答案

尽管我不清楚您的问题,但在这里我想回答:

您可以递归搜索Web应用程序的根目录,并在其中读取所有*.aspx文件.将每个文件添加到列表(例如,IList<string></string>),可以将其设置为具有丰富数据绑定控件的DataSource 属性,并绑定DataSource 以查看列表中的所有页面.

[ ^ ]向您展示如何递归搜索目录.

但是,如果要以编程方式浏览网站的aspx文件,则需要知道URL,为此,您需要具有SiteMap.xml 或类似文件,其中包含网站中每个aspx文件的URL和名称.地点.您需要阅读并解析SiteMap文件,以便在必要时向每个aspx页面发送一个Web请求.
Despite the fact that I wasn''t clear about your question, here I am trying to answer:

You can recursively search the web application''s root directory and read all *.aspx files there. You add each file to a list (Say, an IList<string></string>) which you can set to a DataSource property of a rich Data bound control and Bind the DataSource to see all pages in a listing.

This[^] shows you how to search a directory recursively.

However, if you want to navigate a web site''s aspx files programmetically, you need to know the URLs and for that you need to have a SiteMap.xml or a similar file containing the URLs and names of each aspx file in your web site. You need to read and parse the SiteMap file to send a web request to each aspx page if necessary.


这篇关于将所有页面读入解决方案资源管理器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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