void ibtnPublish_Click(object sender, ImageClickEventArgs e)
{
for (int i = 0; i < dlsGallery.Items.Count; i++)
{
if (dlsGallery.Items[i].ItemType == ListItemType.Item || dlsGallery.Items[i].ItemType == ListItemType.AlternatingItem)
{
CheckBox chkItem = (CheckBox)dlsGallery.Items[i].FindControl("chkItem");
if (chkItem != null && chkItem.Checked)
{
HtmlInputHidden hdnID = (HtmlInputHidden)dlsGallery.Items[i].FindControl("hdnID");
if (hdnID != null && !string.IsNullOrEmpty(hdnID.Value))
{
int galleryID = Convert.ToInt32(hdnID.Value);
PublishManager.Add(PrepareNewPublish(galleryID));
}
}
}
}
FillGallerys();
ExitMode();
upnlGalleryItem.Update();
upnlGalleryAdd.Update();
}