Click here to Skip to main content
15,902,893 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please someone tell that how to show all images from small and big images application folder in repeater control

My code is done with static but i dont have a idea how to bind all application folder images into repeater in asp.net c#
XML
<ItemTemplate>

 <a class="vlightbox1" name="leaf" href="upload/ThumbImage/4252011110839.jpg">
  <img src="upload/PopupImage/4252011110839.jpg"/>
</a>
 </ItemTemplate>

Please, someone help me to solve the problem and for the code in code behind file c# file also

Thanks
Posted
Updated 26-Apr-11 3:20am
v3
Comments
Rob Branaghan 26-Apr-11 9:07am    
Can you edit this post Chander_Rani so it comes through correctly.
And if you need help with the C#, can you post this here also?
Thank you

You can do it like that
string[] strFiles = Directory.GetFiles("YOUR PATH");

Now bind the repeater with the strFiles .
<itemtemplate>
	<a class="vlightbox1" name="leaf" href="upload/ThumbImage/<%#Eval(FILE_NAME)%>">
	<img src="upload/PopupImage/<%#Eval(FILE_NAME)%>" /></a>
</itemtemplate>
 
Share this answer
 
See this Solution[^]. it exactly match with your scenario.

P.S: First try in google. Here i am tried with "repeater with images from folder asp.net" see the Google Results[^]. Try any one sample. If you face any difficult in that (error/ exception/other issue) then post it here. Try in this way, you will learn lot of things.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900