public void GetAllSubCategoryForFilter(AspxCommonInfo aspxCommonObj)
    {
        string resolvedUrl = ResolveUrl("~/");
        string modulePath = this.AppRelativeTemplateSourceDirectory;
        hst = AppLocalized.getLocale(modulePath);
        string aspxTemplateFolderPath = resolvedUrl + "Templates/" + TemplateName;
        DataSet ds = AspxFilterController.GetCategoryDetailInfoForFilter(Categorykey, aspxCommonObj);
        if (ds != null && ds.Tables != null && ds.Tables.Count > 0)
        {
            StringBuilder elem = new StringBuilder();
            DataTable dtSubCatWithItems = ds.Tables[0];
            elem.Append("<div class=\"filter\">");
            if (dtSubCatWithItems != null && dtSubCatWithItems.Rows.Count > 0)
            {
                elem.Append("<div id=\"divCat\" value=\"b01\" class=\"cssClasscategorgy\">");
                elem.Append("<div class=\"divTitle\"><b><label style=\"color:#006699\">");
                elem.Append(getLocale("Categories"));
                elem.Append("</label></b><img align=\"right\" src=\"");
                elem.Append(aspxTemplateFolderPath);
                elem.Append("/images/arrow_up.png\"/></div> <div id=\"scrollbar1\" class=\"cssClassScroll\"><div class=\"viewport\"><div class=\"overview\" id=\"catOverview\"><div class=\"divContentb01\"><ul id=\"cat\">");
                for (int i = 0; i < dtSubCatWithItems.Rows.Count; i++)
                {
                    elem.Append("<li><label><input class=\"chkCategory\" type=\"checkbox\" name=\"");
                    elem.Append(dtSubCatWithItems.Rows[i]["CategoryName"]);
                    elem.Append("\" ids=\"");
                    elem.Append(dtSubCatWithItems.Rows[i]["CategoryID"]);
                    elem.Append("\" value=\"");
                    elem.Append(dtSubCatWithItems.Rows[i]["CategoryName"]);
                    elem.Append("\"/> ");
                    elem.Append(dtSubCatWithItems.Rows[i]["CategoryName"]);
                    elem.Append("<span> (");
                    elem.Append(dtSubCatWithItems.Rows[i]["ItemCount"]);
                    elem.Append(")</span></label></li>");
                }
                elem.Append("</ul></div></div></div></div></div>");

            }

            string brandFilter = GetAllBrandForCategory(aspxCommonObj);
            elem.Append(brandFilter);
            elem.Append("</div>");
            ltrFilter.Text = elem.ToString();

            DataTable dtCatSlider = ds.Tables[1];
            if (dtCatSlider != null && dtCatSlider.Rows.Count > 0)
            {
                string Imagelist = string.Empty;
                StringBuilder strCatHeadSlider = new StringBuilder();
                StringBuilder strCatHeadScript = new StringBuilder();
                bool isNoCategoryImage = false;
                string categoryImagePath = "Modules/AspxCommerce/AspxCategoryManagement/uploads/";
                int imgCount = 0;
                strCatHeadSlider.Append("<div id=\"divHeader\" class=\"cssClassSlider\" style=\"display: none;\">");

                strCatHeadSlider.Append("<div id=\"slider-container\"><div id=\"sliderObj\" class=\"cat-slideshow-wrap\">");
                strCatHeadSlider.Append("<div class=\"cat_Slides cat-slide-container\">");

                for (int i = 0; i < dtCatSlider.Rows.Count; i++)
                {
                    if (dtCatSlider.Rows[i]["CategoryImage"].ToString() != string.Empty)
                    {
                        string[] imgUrlSegments = dtCatSlider.Rows[i]["CategoryImage"].ToString().Split('/');
                        string imgToBeAdded = imgUrlSegments[imgUrlSegments.Length - 1] + ';';
                        Imagelist += imgToBeAdded;
                        isNoCategoryImage = true;
                        string catDesc = dtCatSlider.Rows[i]["CategoryShortDesc"].ToString();

                        if (catDesc.Length > 300)
                        {
                            catDesc = catDesc.Substring(0, 300);
                            int index = 0;
                            index = catDesc.LastIndexOf(' ');
                            catDesc = catDesc.Substring(0, index);
                            catDesc = catDesc + "...";
                        }

                        //check for this
                        string href = resolvedUrl + "category/" + AspxUtility.fixedEncodeURIComponent(dtCatSlider.Rows[i]["CategoryName"].ToString()) + SageFrameSettingKeys.PageExtension;
                        imgCount++;
                        string catImagePath = dtCatSlider.Rows[i]["CategoryImage"].ToString();
                        strCatHeadSlider.Append("<div class=\"cat-slide-container-inner\"><div class=\"cssCatImage\"><a href=");
                        strCatHeadSlider.Append(href);
                        strCatHeadSlider.Append("><img src='");
                        strCatHeadSlider.Append(resolvedUrl);
                        strCatHeadSlider.Append(categoryImagePath);
                        strCatHeadSlider.Append(catImagePath);
                        strCatHeadSlider.Append("' alt='");
                        strCatHeadSlider.Append(dtCatSlider.Rows[i]["CategoryName"]);
                        strCatHeadSlider.Append("' title='");
                        strCatHeadSlider.Append(dtCatSlider.Rows[i]["CategoryName"]);
                        strCatHeadSlider.Append("' /></a></div><div class=\"cssCatDesc\"><span>");
                        strCatHeadSlider.Append(dtCatSlider.Rows[i]["CategoryName"]);
                        strCatHeadSlider.Append("</span><p>");
                        strCatHeadSlider.Append(catDesc);
                        strCatHeadSlider.Append("</p></div></div>");
                    }
                }
                if (isNoCategoryImage)
                {
                    InterceptImageController objImageResize = new InterceptImageController();
                    objImageResize.DynamicImageResizer(Imagelist, "Medium", "Category", aspxCommonObj);
                }
                strCatHeadSlider.Append("</div>");
                strCatHeadSlider.Append("<div class=\"slideshow-progress-bar-wrap\" style=\"display: none;\">");
                strCatHeadSlider.Append("<div class=\"highlight-bar\">");
                strCatHeadSlider.Append("<div class=\"edge left\"></div><div class=\"edge right\"></div>");
                strCatHeadSlider.Append("</div><div class=\"slideshow-progress-bar\"></div></div></div></div>");
                strCatHeadSlider.Append("</div>");
                strCatHeadScript.Append("$('#divHeader').show();");
                if (imgCount > 1)
                {
                    strCatHeadScript.Append("var catSlideshowWrap = jQuery('#slider-container').find('#sliderObj');");
                    strCatHeadScript.Append("var catSlidesContainer = catSlideshowWrap.find('div.cat-slide-container');");
                    strCatHeadScript.Append("var catSlides = catSlidesContainer.children('div');");
                    strCatHeadScript.Append("var pager = catSlideshowWrap.find('div.slideshow-progress-bar-wrap div.slideshow-progress-bar');");
                    strCatHeadScript.Append("var highlightBar = catSlideshowWrap.find('div.highlight-bar');");
                    strCatHeadScript.Append("var pagerMarkup = new Array();");
                    strCatHeadScript.Append("var pagerElPercentW = 1 / catSlides.length * 100;");
                    strCatHeadScript.Append("catSlides.each(function (i) {");
                    strCatHeadScript.Append("var oneBasedIndex = i + 1;");
                    strCatHeadScript.Append("pagerMarkup.push('<div class=pagerLink style=width: ' + pagerElPercentW + '%;><div class=pager' + oneBasedIndex + '></div></div>');");
                    strCatHeadScript.Append("});");
                    strCatHeadScript.Append("pager.append(pagerMarkup.join(''));");
                    strCatHeadScript.Append("highlightBar.css('width', pagerElPercentW + '%');");
                    strCatHeadScript.Append("var TRANSITION_SPEED = 500;");
                    strCatHeadScript.Append("catSlidesContainer.cycle({");
                    strCatHeadScript.Append("activePagerClass: 'active',");
                    strCatHeadScript.Append("before: function (curr, next, opts) {");
                    strCatHeadScript.Append("highlightBar.stop(true).animate(");
                    strCatHeadScript.Append("{");
                    strCatHeadScript.Append("'left': pager.find('div.pagerLink').eq(jQuery(next).index()).position().left");
                    strCatHeadScript.Append("},");
                    strCatHeadScript.Append("TRANSITION_SPEED");
                    strCatHeadScript.Append(");");
                    strCatHeadScript.Append("},");
                    strCatHeadScript.Append("fx: 'fade',");
                    strCatHeadScript.Append("speed: TRANSITION_SPEED,");
                    strCatHeadScript.Append("timeout: 5000,");
                    strCatHeadScript.Append("pause: 1,");
                    strCatHeadScript.Append("pauseOnPagerHover: 1,");
                    strCatHeadScript.Append("pager: '#slider-container #sliderObj div.slideshow-progress-bar-wrap div.slideshow-progress-bar',");
                    strCatHeadScript.Append("pagerAnchorBuilder: function (idx, slide) {");
                    strCatHeadScript.Append("return '#slider-container #sliderObj div.slideshow-progress-bar-wrap div.slideshow-progress-bar div.pagerLink:eq(' + idx + ')';");
                    strCatHeadScript.Append("},");
                    strCatHeadScript.Append("pagerEvent: 'mouseenter.cycle'");
                    strCatHeadScript.Append("});");
                    strCatHeadScript.Append("$('.slideshow-progress-bar-wrap').show();");
                    strCatHeadScript.Append("}");

                }
                if (!isNoCategoryImage)
                {
                    strCatHeadScript.Append(" $('#divHeader').remove();");
                }
                string script = GetStringScript(strCatHeadScript.ToString());
                strCatHeadSlider.Append(script);
                ltrCatSlider.Text = strCatHeadSlider.ToString();

            }

        }
    }
 private void BindGallery(List<ItemsInfoSettings> lstItemGallery,AspxCommonInfo aspxCommonObj)
 {
     string aspxRootPath = ResolveUrl("~/");
     StoreSettingConfig ssc = new StoreSettingConfig();
     string NoImagePath = ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, StoreID, PortalID, CultureName);
     StringBuilder galleryContainer = new StringBuilder();
     StringBuilder galleryThumbContainer = new StringBuilder();
     galleryThumbContainer.Append("<div id='divBindThumbs' class='thumbs jcarousel-skin'><ul id='thumblist'>");
     galleryContainer.Append("<div id='divMainImage'>");
     ImageCount = lstItemGallery.Count;
     if (lstItemGallery != null && lstItemGallery.Count > 0)
     {            
         foreach (ItemsInfoSettings item in lstItemGallery)
         {
             string imagePath = "Modules/AspxCommerce/AspxItemsManagement/uploads/" + item.ImagePath;
             string altImagePath = "Modules/AspxCommerce/AspxItemsManagement/uploads/" + item.AlternateText;
             if (item.ImagePath == string.Empty)
             {
                 imagePath = NoImagePath;
             }
             else
             {   //Resize Image Dynamically
                 InterceptImageController objImage = new InterceptImageController();
                 objImage.MultipleImageResizer(item.ImagePath, (ImageType.Medium + ";" + ImageType.Large + ";" + ImageType.Small), ImageCategoryType.Item.ToString(), aspxCommonObj);
             }
             if (lstItemGallery.IndexOf(item) == 0)
             {
                 referImagePath = imagePath;
                 galleryContainer.Append("<a rel='' href=\"");
                 galleryContainer.Append(aspxRootPath);
                 galleryContainer.Append(imagePath);
                 galleryContainer.Append("\" id='zoom1' class='cloud-zoom'  title=\"");
                 galleryContainer.Append(item.AlternateText);
                 galleryContainer.Append("\"><img title=\"");
                 galleryContainer.Append(item.AlternateText);
                 galleryContainer.Append("\" src=\"");
                 galleryContainer.Append(aspxRootPath);
                 galleryContainer.Append(imagePath.Replace("uploads", "uploads/Large"));
                 galleryContainer.Append("\"></a>");
             }
             string rel = "useZoom: 'zoom1', smallImage: '" + aspxRootPath + imagePath.Replace("uploads", "uploads/Large") + "' ";
             galleryThumbContainer.Append("<li><a rel=\"");
             galleryThumbContainer.Append(rel);
             galleryThumbContainer.Append("\" href=\"");
             galleryThumbContainer.Append(aspxRootPath);
             galleryThumbContainer.Append(imagePath);
             galleryThumbContainer.Append("\" class='cloud-zoom-gallery'><img title=\"");
             galleryThumbContainer.Append(item.AlternateText);
             galleryThumbContainer.Append("\" src=\"");
             galleryThumbContainer.Append(aspxRootPath);
             galleryThumbContainer.Append(imagePath.Replace("uploads", "uploads/Small"));
             galleryThumbContainer.Append("\" class='zoom-tiny-image'></a></li>");
         }
     }
     else
     {
         galleryContainer.Append("<a rel='' href=\"");
         galleryContainer.Append(aspxRootPath);
         galleryContainer.Append(NoImagePath);
         galleryContainer.Append("\" id='zoom1' class='cloud-zoom' ");           
         galleryContainer.Append("><img src=\"");
         galleryContainer.Append(aspxRootPath);
         galleryContainer.Append(NoImagePath.Replace("uploads", "uploads/Large"));
         galleryContainer.Append("\"></a>");
         string rel = "useZoom: 'zoom1', smallImage: '" + aspxRootPath + NoImagePath.Replace("uploads", "uploads/Large") + "' ";
         galleryThumbContainer.Append("<li><a rel=\"");
         galleryThumbContainer.Append(rel);
         galleryThumbContainer.Append("\" href=\"");
         galleryThumbContainer.Append(aspxRootPath);
         galleryThumbContainer.Append(NoImagePath);
         galleryThumbContainer.Append("\" class='cloud-zoom-gallery'><img src=\"");
         galleryThumbContainer.Append(aspxRootPath);
         galleryThumbContainer.Append(NoImagePath.Replace("uploads", "uploads/Small"));
         galleryThumbContainer.Append("\" class='zoom-tiny-image'></a></li>");
     }
     galleryContainer.Append("</ul></div>");
     galleryThumbContainer.Append("</div>");
     ltrItemGallery.Text = galleryContainer.ToString();
     ltrItemThumb.Text = galleryThumbContainer.ToString();
 }