الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

ابغي كود فوتو جاليري

مغلق
بدأه دون سيلفاتور في 29 نوفمبر 2005 · 3 رد · 563 مشاهدة · في ASP.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم

انا عندي مجلد فيه مجموعه من الصور

ابغي اعرضهم في فوتو جاليري

او في صوره و 2 Button

بحيث اقدر اتنقل للتالي والسابق

وهذا هو كود احضار الصور من المجلد :

string sp;
string [] subdirectoryEntries = Directory.GetFiles(Server.MapPath@"pic\act\"+id));
 	 foreach(string dn in subdirectoryEntries)
 	 {
                
    
    DirectoryInfo di = new DirectoryInfo(dn);
    sp+="<IMG style='BORDER-RIGHT: #000000 double; BORDER-TOP: #000000 double; BORDER-LEFT: #000000 double;BORDER-BOTTOM: #000000 double;   POSITION: relative;  ' alt="+di.Name+" src="+di.FullName+" height=180 width=200 ><br><hr  style=' HEIGHT: 8px; BACKGROUND-COLOR: #993300' align=left width=200 SIZE=8><br>";
    
                    
    
 	 }
 	 Response.Write(sp);

ومشكورين

تم تعديل هذه المشاركة بواسطة محمد النحراوي في 2 ديسمبر 2005 في 10:41

abo_alzobaer@hotmail.com

#2

??????????????????????????????

abo_alzobaer@hotmail.com

#3

مرحبا

الحل عندي بس روح على البيت

إن شاء الله B)

printf("Life is Pain..... Get Over it")
#4

hello

....sorry coz i dont have arabic enabled in my keyboard

...anyhow ive done such thing in my website

its easy ..just make a preview page use image control with 2 buttons or 2 image button if you want to make it arrow image or somthing

then send a parameter to the page with the images folder directory and name all the images with numbers 01 02 03 ... 50 etc

in the page load

If item < MAX And item > 0 Then
Image.ImageUrl = "images/" + Type + "/" + item + ".jpg"
End If

If item <= 1 Then
Pre.Visible = False
prelbl.Visible = False
Image.ImageUrl = "images/" + Type + "/" + item + ".jpg"
End If
If item >= MAX Then
Nex.Visible = False
nxtlbl.Visible = False
Image.ImageUrl = "images/" + Type + "/" + item + ".jpg"
End If

:then the next and previous button with do this

Response.Redirect("Preview.aspx?item=" + Up + "&type=" + Type + "&max=" + MAX)

UP is item number +1

Response.Redirect("Preview.aspx?item=" + Down + "&type=" + Type + "&max=" + MAX)

down is item number +1

Example can be found in Here

!Sorry coz i had to right it down in english

if you need more explanation am ready ...

Greso

هذا الموضوع مغلق.

مواضيع مشابهة