Any suggestion or hint is much appreciated. Thans in advance.
Hi hoe
You can do some looping in the files, open each file and check with a regular expression if the "Master File" text is inside the title tag.
If you want to display this list often, maybe you should store the result in a dataset and put it for some minutes inside the cache to reduce the load on the server :-)
Just an idea ...
Hi, Michael, thanks for your idea.
I will try to work on it. Now, I only know how to loop through pages in a directory. So, I have to find out on how to open the file and read the Title tag.
Could you please kind enough to explain more in "store the result in a dataset and put it for some minutes inside the cache"? It that means that whenever we create a dataset, the dataset is kept in the cache, or we actually have to do it programmatically?
Thanks in advance.
This is possible.
Loop throught the files with the FILE and DIRECTORY object
Store them in an array when done list them in your User Interface
Simple, there are many examples on the net
You can use many things to parse the html. SreamReader, old school FSO, you can also use regexp.
Just use what you are most confortable with.
gl
Hi hoe
To open a textfile just use something like the following
<code>
dimsas string=string.empty
dimfasstreamreader = file.opentext("filename.html")
s = f.readtoend
</code>
Then you could perform the replacements inside "s".
Well you can cache results / pages with the @.OutputCache directive in the aspx page or programmatically if you use HttpContext.Current.Cache Objects.
thanks to Micheal and gl! I will try to work on it again.
I had changed the way to do it just now. I changed all of my file names with Title "? Master File" into "?MasterFile.aspx". Then, I will get all the files with file name that match "*MasterFile*.aspx". Because I only know how to list files from directory only at the moment...
Your replies are greatly appreciated, and once again, Thank you!
0 comments:
Post a Comment