مربوط به قسمت سورس<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<link href="css/lightbox.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div style="height: 436px; overflow: scroll;">
<asp:Panel ID="Panel1" runat="server" Height="432px" onload="Panel1_Load">
</asp:Panel>
</div>
</asp:Content>
کد های C#
protected void Panel1_Load(object sender, EventArgs e)
{
int i;
DataSet1TableAdapters.galleryTableAdapter galerry = new DataSet1TableAdapters.galleryTableAdapter();
DataTable temp = new DataTable();
temp = galerry.GetData();
for (i = 0; i < temp.Rows.Count; i++)
{
HtmlImage img = new HtmlImage();
img.Src = temp.Rows[i]["small_image"].ToString();
img.Width = 100;
img.Height = 100;
HtmlAnchor cont = new HtmlAnchor();
cont.HRef = temp.Rows[i]["big_image"].ToString();
cont.Attributes.Add("rel", "lightbox");
cont.Controls.Add(img);
Panel1.Controls.Add(cont);
}
}
کتابخانه های جاوا مربوط به light box در jquary هستند