jquery / asp.net - get the number of images in a folder where the first two characters of the file name are XX
I have been looking for the best way to obtain the total number images in a folder where the first two characters on the file name are XX and place this number into a variable.
So for example - I have a folder containing the foll开发者_如何转开发owing images:
XX-01.jpg
XX-02.jpg XX-03.jpg YY-01.jpg ZZ-01.jpgSo I would populate the variable with 3 in this case.
Does anyone know of any way to do this?
Do not do it in jQuery.
Go server side instead. Those are the kind of bad code another developer will curse you for.
精彩评论