N
Nick
Is it possible to read a list of files from a specified directory using
VB.net
We have company intranet and I have created a page that displays photos from
different events.
I have coded a page that display images from a particular directory and
named the files Pic1.jpg, Pic2.jpg etc. My code then cycles through the
images and displays them in the browser. I store the current image number in
a session variable and apply it to the image control when the page is
loaded. The user then clicks a button to go to the next image.
To be honest all this works absolutely fine. If I add pictures I have to
rename the new files and change a constant in my code so that you can't
browse past the last image. This really isn't much of a probelm, but I was
wondering if there was a way of reading the contents of a directory using
vb.net and store them say in the cache object as an array. That way I can
get the number of files dynamically rather that having to recode.
Just curious and hoping to expand on the little bit of knowledge I have.
Many thanks in advance
Nick.
VB.net
We have company intranet and I have created a page that displays photos from
different events.
I have coded a page that display images from a particular directory and
named the files Pic1.jpg, Pic2.jpg etc. My code then cycles through the
images and displays them in the browser. I store the current image number in
a session variable and apply it to the image control when the page is
loaded. The user then clicks a button to go to the next image.
To be honest all this works absolutely fine. If I add pictures I have to
rename the new files and change a constant in my code so that you can't
browse past the last image. This really isn't much of a probelm, but I was
wondering if there was a way of reading the contents of a directory using
vb.net and store them say in the cache object as an array. That way I can
get the number of files dynamically rather that having to recode.
Just curious and hoping to expand on the little bit of knowledge I have.
Many thanks in advance
Nick.