-1

Presently I have an html and I am uploading an image using file upload control, my Default.html page displays all uploaded images as this --> http://blog.readingroom.com/2012/01/27/scattered-images-and-not-so-random-numbers/.

Now what I want is, using some javascript or jquery can I have count of uploaded images and then add that count of images in my Default.html page which displays all images. In short the process should be automated after file upload, image should be shown on Default.html page.

Plz help as I have already searched many questions on SO and Google, but nothing seems fruitful to me. Your help would be really appreciated. Thanks in advance. Note that I am newbie in Jquery, so kindly show your detailed code.

Huzaifa
  • 9
  • 2

1 Answers1

0

Javascript is a client side language. It does not have access to the server of that degree. You will need to pass that number from asp.net. I have never used asp.net, but I found a S.O. question about counting files here. The gist of it is as follows:

IO.Directory.GetFiles("\translated\path","27_*.jpg").Count()

If you are ok with a bit of php, try this.

Community
  • 1
  • 1
Marcel
  • 1,034
  • 1
  • 17
  • 35