1

I want to create a picture album in asp.net using c# in which user can directly view all the images or by clicking on specific category which will start from the selected category page but when user click on next or prev button he or she can view full album.I have successfully created the album but facing only one problem when I click on category it shows only the category specific pages I want it to show only first page of category and when user clicks on next and prev button it shows all the images of album.

here is my code:

public string imagePath = "";
        public string folder = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (HttpContext.Current.Request.QueryString["m"] != null)
            {
                string menuID = HttpContext.Current.Request.QueryString["m"].ToString();
                HttpContext.Current.Session["menuName"] = menuID;
            }
            else
            {
                string menuID = null;
                HttpContext.Current.Session["menuName"] = menuID;
            }
        }

        [System.Web.Services.WebMethod]
        [System.Web.Script.Services.ScriptMethod]
        public static Slide[] GetImages()
        {
            int menuCatID = Convert.ToInt32(HttpContext.Current.Session["menuName"]);
            string strEdtion = Convert.ToString(HttpContext.Current.Session["Edition"]);
            Dal.MenuMasterDal objdal = new Dal.MenuMasterDal();
            DataSet ds = objdal.SelectMenuCategory(Convert.ToInt32(menuCatID), Convert.ToString(strEdtion));
            DataTable dt = ds.Tables[0];
            AjaxControlToolkit.Slide[] slides = new AjaxControlToolkit.Slide[dt.Rows.Count];
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                slides[i] = new AjaxControlToolkit.Slide("PDF/" + strEdtion + "/" + dt.Rows[i]["MenuCategoryUrl"].ToString() + ".jpg", dt.Rows[i]["MenuCategoryName"].ToString(), dt.Rows[i]["MenuCategoryUrl"].ToString()); //sending the imgID to the handler to show which image will be viewed in slide
            }
            return slides;
        }
chaya
  • 11
  • 1

0 Answers0