protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["subcat"] == "Circulars/Instructions")
            {
                category = Request.QueryString["cat"].Replace("/", " ");
                subcategory = Request.QueryString["subcat"];
            }
            else if (Request.QueryString["subcat"] == "Case/Laws")
            {
                category = Request.QueryString["cat"].Replace("/", " ");
                subcategory = Request.QueryString["subcat"].Replace("/", " ");
                lblAgreements.Text = category + " " + subcategory;
            }

            else
            {
                category = Request.QueryString["cat"].Replace("/", " ");
                subcategory = Request.QueryString["subcat"].Replace("/", " ");
            }

            #region Circulars/Instructions
            if (subcategory == "Circulars/Instructions" & category != "")
            {
                group = subcategory.Split('/');

                if (group[0].Equals("Circulars"))
                {
                    Circulars_Index_selectTableAdapter circularIndex = new Circulars_Index_selectTableAdapter();
                    DataTable dtcircularsIndex = circularIndex.Circulars_Index(category);
                    if (dtcircularsIndex.Rows.Count > 0)
                    {
                        dlIndexCirculars.DataSource = dtcircularsIndex;
                        dlIndexCirculars.DataBind();
                    }

                    if (group[1].Equals("Instructions"))
                    {
                        Instructors_Index_selectTableAdapter instructorsIndex = new Instructors_Index_selectTableAdapter();
                        DataTable dtinstructorsIndex = instructorsIndex.Instructors_Index(category);
                        if (dtinstructorsIndex.Rows.Count > 0)
                        {
                            dlIndexInstrcutions.DataSource = dtinstructorsIndex;
                            dlIndexInstrcutions.DataBind();
                        }
                    }
                }
                InvisibleRuleLabels();
                InvisibleFormLabels();
                dlIndex.Visible = true;
                //invisible rules
                dlAgreements.Visible = false;
                dlBaggage.Visible = false;
                dlCustomDrawBack.Visible = false;
                dlCustomValuation.Visible = false;
                dlOthers.Visible = false;
                //invisible forms
                dlRefunds.Visible = false;
                dlAppeals.Visible = false;
                dlDrawback.Visible = false;
                dlOthersApplicationForms.Visible = false;
                dlShipping.Visible = false;
                dllBill.Visible = false;
                dlBonds.Visible = false;
                dlSettlementCommission.Visible = false;
                dlSTCaseLaws.Visible = false;
                dlDGFT.Visible = false;

                //invisible SEZ
                gvSEZ.Visible = false;
                //invisible ServiceTax
                gvservicetaxforms.Visible = false;
                gvstacts.Visible = false;
                gvstrules.Visible = false;
                dtstaccodes.Visible = false;
                dlITActs.Visible = false;
                pnlITActsGift.Visible = false;
                pnlITActsInterest.Visible = false;
                dlantidumpingduty.Visible = false;
                pnlSION.Visible = false;
                //visible Circular/Instruction Headings
                if (category == "DGFT")
                {
                    lblInstructionHeading.Visible = false;

                }
                else
                {
                    lblInstructionHeading.Visible = true;
                }

                lblCircularHeading.Visible = true;

                pnlSTlibraries.Visible = false;
                pnlSTTaxation.Visible = false;
                pnlCEManual.Visible = false;
                dltariff.Visible = false;
                dlnontariff.Visible = false;
                dlsafeguards.Visible = false;
                dlCECothers.Visible = false;
                dlSTN.Visible = false;

            }
            #endregion
            else
            {
                if (category == "Customs")
                {
                    #region CustomsIndex

                    if (category == "Customs" & subcategory == "Rules")
                    {
                        VisibleRuleLabels();
                        InvisibleFormLabels();
                        dlIndex.Visible = false;
                        //visible rules
                        dlAgreements.Visible = true;
                        dlBaggage.Visible = true;
                        dlCustomDrawBack.Visible = true;
                        dlCustomValuation.Visible = true;
                        dlOthers.Visible = true;
                        //invisible froms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlDGFT.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;
                        //invisible SEZ
                        gvSEZ.Visible = false;
                        //invisible ServiceTax
                        gvservicetaxforms.Visible = false;
                        gvstacts.Visible = false;
                        gvstrules.Visible = false;
                        dtstaccodes.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        pnlSION.Visible = false;
                        lblAgreements.Text = "Agreements between nations";
                        lblBaggage.Text = "Baggage Rules, 1998";

                        ActsTableAdapter indexByHeadings = new ActsTableAdapter();
                        DataTable dtAgreements = indexByHeadings.GetIndexbyRulesHeadings(subcategory, "Agreements between nations");
                        dlAgreements.DataSource = dtAgreements;
                        dlAgreements.DataBind();

                        DataTable dtBaggage = indexByHeadings.GetIndexbyRulesHeadings(subcategory, "Baggage Rules, 1998");
                        dlBaggage.DataSource = dtBaggage;
                        dlBaggage.DataBind();

                        DataTable dtCustomDrawBack = indexByHeadings.GetIndexbyRulesHeadings(subcategory, "Customs Drawback Rules");
                        dlCustomDrawBack.DataSource = dtCustomDrawBack;
                        dlCustomDrawBack.DataBind();

                        DataTable dtCustomValuation = indexByHeadings.GetIndexbyRulesHeadings(subcategory, "Customs Valuation Rules");
                        dlCustomValuation.DataSource = dtCustomValuation;
                        dlCustomValuation.DataBind();

                        DataTable dtOthers = indexByHeadings.GetIndexbyRulesHeadings(subcategory, "Others");
                        dlOthers.DataSource = dtOthers;
                        dlOthers.DataBind();
                    }
                    else if (category == "Customs" & subcategory == "Forms")
                    {
                        InvisibleRuleLabels();
                        VisibleFormLabels();
                        dlIndex.Visible = false;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlOthers.Visible = false;
                        //visible froms
                        dlRefunds.Visible = true;
                        dlAppeals.Visible = true;
                        dlDrawback.Visible = true;
                        dlOthersApplicationForms.Visible = true;
                        dlShipping.Visible = true;
                        dllBill.Visible = true;
                        dlBonds.Visible = true;
                        dlDGFT.Visible = false;
                        dlSettlementCommission.Visible = true;
                        dlSTCaseLaws.Visible = false;
                        //invisible SEZ
                        gvSEZ.Visible = false;
                        //invisible ServiceTax Data
                        gvservicetaxforms.Visible = false;
                        gvstacts.Visible = false;
                        gvstrules.Visible = false;
                        dtstaccodes.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        pnlSION.Visible = false;
                        ActsTableAdapter indexByHeadings = new ActsTableAdapter();

                        DataTable dtRefunds = indexByHeadings.GetIndexbyFormsHeadings(subcategory, "Application Forms", "Refunds");
                        dlRefunds.DataSource = dtRefunds;
                        dlRefunds.DataBind();

                        DataTable dtAppeals = indexByHeadings.GetIndexbyFormsHeadings(subcategory, "Application Forms", "Appeals");
                        dlAppeals.DataSource = dtAppeals;
                        dlAppeals.DataBind();

                        DataTable dtDrawback = indexByHeadings.GetIndexbyFormsHeadings(subcategory, "Application Forms", "Drawback");
                        dlDrawback.DataSource = dtDrawback;
                        dlDrawback.DataBind();

                        DataTable dtOthersApplicationForms = indexByHeadings.GetIndexbyFormsHeadings(subcategory, "Application Forms", "Others");
                        dlOthersApplicationForms.DataSource = dtOthersApplicationForms;
                        dlOthersApplicationForms.DataBind();

                        DataTable dtShipping = indexByHeadings.GetIndexbyFormsHeadings(subcategory, "Shipping Bill Forms", "");
                        dlShipping.DataSource = dtShipping;
                        dlShipping.DataBind();

                        DataTable dtBill = indexByHeadings.GetIndexbyFormsHeadings(subcategory, "Bill of Entry Forms", "");
                        dllBill.DataSource = dtBill;
                        dllBill.DataBind();

                        DataTable dtBonds = indexByHeadings.GetIndexbyFormsHeadings(subcategory, "Bonds", "");
                        dlBonds.DataSource = dtBonds;
                        dlBonds.DataBind();

                        DataTable dtSettlementCommission = indexByHeadings.GetIndexbyFormsHeadings(subcategory, "Settlement Commission", "");
                        dlSettlementCommission.DataSource = dtSettlementCommission;
                        dlSettlementCommission.DataBind();
                    }
                    else if (category == "Customs" & subcategory == "SEZ")
                    {
                        InvisibleRuleLabels();
                        InvisibleFormLabels();
                        //invisible all
                        dlIndex.Visible = false;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlOthers.Visible = false;
                        //invisible forms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlDGFT.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;
                        //visible SEZ
                        gvSEZ.Visible = true;
                        //invisible ServiceTax Data
                        gvservicetaxforms.Visible = false;
                        gvstacts.Visible = false;
                        gvstrules.Visible = false;
                        dtstaccodes.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        pnlSION.Visible = false;
                        ActsTableAdapter index = new ActsTableAdapter();
                        DataTable dtSEZ = index.SEZ_Index(subcategory);
                        gvSEZ.DataSource = dtSEZ;
                        gvSEZ.DataBind();
                    }
                    else if (category == "Customs" & subcategory == "Tariff 2012-13")
                    {
                        InvisibleRuleLabels();
                        InvisibleFormLabels();
                        //invisible all
                        dlIndex.Visible = false;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlOthers.Visible = false;
                        //invisible forms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;
                        dlDGFT.Visible = false;
                        //visible SEZ
                        gvSEZ.Visible = true;
                        //invisible ServiceTax Data
                        gvservicetaxforms.Visible = false;
                        gvstacts.Visible = false;
                        gvstrules.Visible = false;
                        dtstaccodes.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;
                        pnlCEManual.Visible = false;
                        pnlSTTaxation.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        pnlSION.Visible = false;
                        DataTable dtGroups = new DataTable();
                        DataRow row = null;

                        DataColumn dcRelationShip = new DataColumn("Group");
                        dcRelationShip.DataType = System.Type.GetType("System.String");
                        dtGroups.Columns.Add(dcRelationShip);
                        row = dtGroups.NewRow();
                        row["Group"] = "General Notes";
                        dtGroups.Rows.Add(row);
                        row = dtGroups.NewRow();
                        row["Group"] = "Import Tariff";
                        dtGroups.Rows.Add(row);
                        row = dtGroups.NewRow();
                        row["Group"] = "General Exemptions";
                        dtGroups.Rows.Add(row);
                        row = dtGroups.NewRow();
                        row["Group"] = "The Second Schedule Export Tariff";
                        dtGroups.Rows.Add(row);
                        row = dtGroups.NewRow();
                        row["Group"] = "Anti Dumping Duty Notifications";
                        dtGroups.Rows.Add(row);
                        row = dtGroups.NewRow();
                        row["Group"] = "Appendix";
                        dtGroups.Rows.Add(row);
                        string redirect = string.Empty;
                        Custom_Tariff_IndexnameTableAdapter index = new Custom_Tariff_IndexnameTableAdapter();

                        ltlIndex.Text = "<table>";
                        foreach (DataRow drGroups in dtGroups.Rows)
                        {
                            string groupName = drGroups[0].ToString();
                            DataTable dtIndex = index.Custom_Tariff_IndexbyGroup(groupName);

                            if (dtIndex.Rows.Count > 0)
                            {
                                string name = string.Empty;
                                string _indexName = string.Empty;
                                foreach (DataRow drIndex in dtIndex.Rows)
                                {
                                    bool isDoc = false;
                                    string indexname = drIndex["indexname"].ToString();
                                    DataTable dtChapterbyIndex = index.GetCustomTariffByIndex(indexname);
                                    if (dtChapterbyIndex.Rows.Count > 0)
                                    {
                                        string aChapter = Convert.ToString(dtChapterbyIndex.Rows[0]["chaptername"]);
                                        if (aChapter.Equals(""))
                                        {
                                            string adata = Convert.ToString(dtChapterbyIndex.Rows[0]["data"]);
                                            isDoc = adata.Equals("");
                                            redirect = "shownotifications.aspx";
                                        }
                                        else
                                        {
                                            redirect = "displayindex.aspx";
                                        }
                                    }

                                    string chapatername = drIndex["chaptername"].ToString();
                                    if (name != groupName)
                                    {
                                        ltlIndex.Text += "<tr><td colspan='2' align='center' style='background-color:#D9D9D9;font-size:1.4em;'>";
                                        ltlIndex.Text += "<b>" + groupName + "</b></td></tr>";
                                    }
                                    ltlIndex.Text += "<tr><td width='200' valign='top'>";
                                    if (_indexName != indexname)
                                    {
                                        ltlIndex.Text += "<br/><a href='" + redirect + "?cat=" + category + "&subcat=" + subcategory + "&name=" + drIndex["indexname"].ToString() + (isDoc ? "' target='_blank'" : string.Empty) + "'>" + drIndex["indexname"].ToString() + "</a>";
                                    }

                                    if (chapatername == "")
                                    {
                                        ltlIndex.Text += "</td><td><br/>" + drIndex["subjects"].ToString() + "<br/></td></tr>";
                                    }
                                    name = groupName;
                                    _indexName = indexname;
                                }
                            }
                        }
                        ltlIndex.Text += "</table>";
                    }

                    else if (category == "Customs" & subcategory == "Notifications")
                    {
                        InvisibleRuleLabels();
                        InvisibleFormLabels();
                        dlIndex.Visible = true;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlOthers.Visible = false;
                        //invisible forms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;
                        //invisible SEZ
                        gvSEZ.Visible = false;
                        dlDGFT.Visible = false;
                        //invisible ServiceTax Data
                        gvservicetaxforms.Visible = false;
                        gvstacts.Visible = false;
                        gvstrules.Visible = false;
                        dtstaccodes.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        dltariff.Visible = true;
                        dlnontariff.Visible = true;
                        dlsafeguards.Visible = true;
                        dlCECothers.Visible = true;
                        dlSTN.Visible = false;
                        pnlSION.Visible = false;
                        CECNotifications();

                    }
                    else if (category == "Customs" & subcategory == "Acts" || subcategory == "Regulations" || subcategory == "Drawback Schedule")
                    {

                        InvisibleRuleLabels();
                        InvisibleFormLabels();
                        dlIndex.Visible = true;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlOthers.Visible = false;
                        //invisible forms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;
                        //invisible SEZ
                        gvSEZ.Visible = false;
                        dlDGFT.Visible = false;
                        //invisible ServiceTax Data
                        gvservicetaxforms.Visible = false;
                        gvstacts.Visible = false;
                        gvstrules.Visible = false;
                        dtstaccodes.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        pnlSION.Visible = false;
                        ActsTableAdapter actsIndexName = new ActsTableAdapter();
                        DataTable dtActsIndexName = actsIndexName.Index_Select(subcategory);
                        if (dtActsIndexName.Rows.Count > 0)
                        {
                            dlIndex.DataSource = dtActsIndexName;
                            dlIndex.DataBind();
                        }
                    }

                    else
                    {
                        InvisibleRuleLabels();
                        InvisibleFormLabels();
                        dlIndex.Visible = false;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlOthers.Visible = false;
                        //invisible forms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;
                        //invisible SEZ
                        gvSEZ.Visible = false;
                        dlDGFT.Visible = false;
                        //invisible ServiceTax Data
                        gvservicetaxforms.Visible = false;
                        gvstacts.Visible = false;
                        gvstrules.Visible = false;
                        dtstaccodes.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        pnlSION.Visible = false;
                        GetAllCaseLawsTableAdapter CLyear = new GetAllCaseLawsTableAdapter();
                        DataTable dtCLyear = CLyear.GetYearsByCategory(category);
                        if (dtCLyear.Rows.Count > 0)
                        {
                            ltlCaselwas.Text = string.Empty;

                            foreach (DataRow CL in dtCLyear.Rows)
                            {
                                int CLuniqueyear=(int)CL["Year"];
                                GetAllCaseLawsTableAdapter CLNumber = new GetAllCaseLawsTableAdapter();
                                DataTable dtCLNumber = CLyear.GetCLNumByYear(category, CLuniqueyear);
                                if(dtCLNumber.Rows.Count>0)

                                {
                                    string CLmaxNumberforyears = dtCLNumber.Rows[0]["maxclnum"].ToString();

                                    int CLmaxNumberforyear = Convert.ToInt32(CLmaxNumberforyears);

                                    if (CLmaxNumberforyear > 0)
                                    {
                                        int c = 1, i = 0, d = 50;
                                        ltlCaselwas.Text += "<table class='citation'><tr><th colspan='3' align='center'>Citation of Year&nbsp;" + CLuniqueyear + "</th></tr><tr>";
                                        for (int v = CLmaxNumberforyear; v > 0; )
                                        {
                                            v = v - 50;
                                            ltlCaselwas.Text += "<td align='center'><a href=displayindex.aspx?CLnum1=" + d + "&CLnum2=" + c + "&year=" + CLuniqueyear + "&cat=" + category + "&subcat=" + subcategory + ">" + c + "-" + d + "</a></td>";
                                            c = c + 50;
                                            if (++i % 3 == 0)
                                            {
                                                ltlCaselwas.Text += "</tr><tr>";
                                            }
                                            d = d + 50;
                                        }
                                        ltlCaselwas.Text += "</tr>";
                                        ltlCaselwas.Text += "</table><br/><br/>";
                                    }

                            }
                            }

                        }
                    }
                    #endregion
                }
                if (category == "Central Excise")
                {
                    #region CentralExciseIndex
                    if (category == "Central Excise" & subcategory == "Rules")
                    {
                        VisibleRuleLabels();
                        InvisibleFormLabels();
                        dlIndex.Visible = false;
                        //visible rules
                        dlAgreements.Visible = true;
                        dlBaggage.Visible = true;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlOthers.Visible = false;
                        //invisible froms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDGFT.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;
                        //invisible SEZ
                        gvSEZ.Visible = false;
                        //invisible ServiceTax Data
                        gvservicetaxforms.Visible = false;
                        gvstacts.Visible = false;
                        gvstrules.Visible = false;
                        dtstaccodes.Visible = false;
                        pnlCEManual.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;

                        lblAgreements.Text = "Central Excise Rules";
                        lblBaggage.Text = string.Empty;
                        lblCustomDrawBack.Visible = false;
                        lblCustomValuation.Visible = false;
                        lblOthers.Visible = false;
                        pnlSTlibraries.Visible = false;
                        pnlSTTaxation.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        dlantidumpingduty.Visible = false;
                        pnlSION.Visible = false;
                        CEActsTableAdapter indexByHeadings = new CEActsTableAdapter();
                        DataTable dtAgreements = indexByHeadings.IndexByHeadings(subcategory, "Central Excise Rules");
                        dlAgreements.DataSource = dtAgreements;
                        dlAgreements.DataBind();

                        DataTable dtBaggage = indexByHeadings.IndexByHeadings(subcategory, "Rescinded or Superseded Rules");
                        dlBaggage.DataSource = dtBaggage;
                        dlBaggage.DataBind();
                    }
                    else if (category == "Central Excise" & subcategory == "Forms")
                    {
                        InvisibleRuleLabels();
                        InvisibleFormLabels();
                        //invisible all
                        dlIndex.Visible = false;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlOthers.Visible = false;
                        //invisible forms
                        dlRefunds.Visible = false;
                        dlDGFT.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;
                        //visible SEZ
                        gvSEZ.Visible = true;
                        //invisible ServiceTax Data
                        gvservicetaxforms.Visible = false;
                        gvstacts.Visible = false;
                        gvstrules.Visible = false;
                        dtstaccodes.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        pnlSION.Visible = false;
                        CEActsTableAdapter index = new CEActsTableAdapter();
                        DataTable dtForms = index.CEForms(subcategory);
                        gvSEZ.DataSource = dtForms;
                        gvSEZ.DataBind();
                    }

                    else if (category == "Central Excise" & subcategory == "Tariff 2012-13")
                    {
                        InvisibleRuleLabels();
                        InvisibleFormLabels();
                        //invisible all
                        dlIndex.Visible = false;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlDGFT.Visible = false;
                        dlOthers.Visible = false;
                        //invisible forms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;
                        //visible SEZ
                        gvSEZ.Visible = true;
                        //invisible ServiceTax Data
                        gvservicetaxforms.Visible = false;
                        gvstacts.Visible = false;
                        gvstrules.Visible = false;
                        dtstaccodes.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        dlantidumpingduty.Visible = false;
                        pnlSION.Visible = false;
                        DataTable dtGroups = new DataTable();
                        DataRow row = null;

                        DataColumn dcRelationShip = new DataColumn("Group");
                        dcRelationShip.DataType = System.Type.GetType("System.String");
                        dtGroups.Columns.Add(dcRelationShip);
                        row = dtGroups.NewRow();
                        row["Group"] = "General Excise Act";
                        dtGroups.Rows.Add(row);
                        row = dtGroups.NewRow();
                        row["Group"] = "Central Excise Tariff Act, 1985 and Exemption Notifications";
                        dtGroups.Rows.Add(row);
                        row = dtGroups.NewRow();
                        row["Group"] = "General Exemptions";
                        dtGroups.Rows.Add(row);
                        row = dtGroups.NewRow();
                        row["Group"] = "Appendix";
                        dtGroups.Rows.Add(row);
                        string redirect = string.Empty;
                        CentralExcise_Tariff_GetAllTableAdapter index = new CentralExcise_Tariff_GetAllTableAdapter();

                        ltlIndex.Text = "<table>";
                        foreach (DataRow drGroups in dtGroups.Rows)
                        {
                            string groupName = drGroups[0].ToString();
                            DataTable dtIndex = index.CE_Tariff_IndexByGroup(groupName);

                            if (dtIndex.Rows.Count > 0)
                            {
                                string name = string.Empty;
                                string _indexName = string.Empty;

                                foreach (DataRow drIndex in dtIndex.Rows)
                                {
                                    bool isDoc = false;
                                    string indexname = drIndex["indexname"].ToString();
                                    DataTable dtChapterbyIndex = index.CE_Tariff_ChapterByIndex(indexname);
                                    if (dtChapterbyIndex.Rows.Count > 0)
                                    {
                                        string aChapter = Convert.ToString(dtChapterbyIndex.Rows[0]["chaptername"]);
                                        if (aChapter.Equals(""))
                                        {
                                            string adata = Convert.ToString(dtChapterbyIndex.Rows[0]["data"]);
                                            isDoc = adata.Equals("");
                                            redirect = "shownotifications.aspx";
                                        }
                                        else
                                        {
                                            redirect = "displayindex.aspx";
                                        }
                                    }

                                    string chapatername = drIndex["chaptername"].ToString();
                                    if (name != groupName)
                                    {
                                        ltlIndex.Text += "<tr><td colspan='2' align='center' style='background-color:#D9D9D9;font-size:1.4em;'>";
                                        ltlIndex.Text += "<b>" + groupName + "</b></td></tr>";
                                    }
                                    ltlIndex.Text += "<tr><td width='100' valign='top'>";
                                    if (_indexName != indexname)
                                    {
                                        ltlIndex.Text += "<br/><a href='" + redirect + "?cat=" + category + "&subcat=" + subcategory + "&name=" + drIndex["indexname"].ToString() + (isDoc ? "' target='_blank'" : string.Empty) + "'>" + drIndex["indexname"].ToString() + "</a>";
                                    }

                                    if (chapatername == "")
                                    {
                                        ltlIndex.Text += "</td><td><br/>" + drIndex["subjects"].ToString() + "<br/></td></tr>";
                                    }
                                    name = groupName;
                                    _indexName = indexname;
                                }
                            }
                        }
                        ltlIndex.Text += "</table>";
                    }
                    else if (category == "Central Excise" & subcategory == "CBEC Manual")
                    {
                        InvisibleRuleLabels();
                        InvisibleFormLabels();
                        //invisible all
                        dlIndex.Visible = false;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlOthers.Visible = false;
                        //invisible forms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlDGFT.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;
                        //visible SEZ
                        gvSEZ.Visible = false;
                        //invisible ServiceTax Data
                        gvservicetaxforms.Visible = false;
                        gvstacts.Visible = false;
                        gvstrules.Visible = false;
                        dtstaccodes.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = true;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        dlantidumpingduty.Visible = false;
                        pnlSION.Visible = false;
                    }
                    else if (category == "Central Excise" & subcategory == "Notifications")
                    {
                        InvisibleRuleLabels();
                        InvisibleFormLabels();
                        dlIndex.Visible = true;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlOthers.Visible = false;
                        //invisible forms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlDGFT.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;
                        //invisible SEZ
                        gvSEZ.Visible = false;
                        //invisible ServiceTax Data
                        gvservicetaxforms.Visible = false;
                        gvstacts.Visible = false;
                        gvstrules.Visible = false;
                        dtstaccodes.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        dltariff.Visible = true;
                        dlnontariff.Visible = true;
                        dlsafeguards.Visible = true;
                        dlCECothers.Visible = true;
                        dlSTN.Visible = false;
                        dlantidumpingduty.Visible = true;
                        pnlSION.Visible = false;
                        CECNotifications();
                    }

                    else  if (category == "Central Excise" & subcategory == "Case Laws" || subcategory == "Case")
                    {
                        InvisibleRuleLabels();
                        InvisibleFormLabels();
                        dlIndex.Visible = false;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlOthers.Visible = false;
                        //invisible forms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;
                        //invisible SEZ
                        gvSEZ.Visible = false;
                        dlDGFT.Visible = false;
                        //invisible ServiceTax Data
                        gvservicetaxforms.Visible = false;
                        gvstacts.Visible = false;
                        gvstrules.Visible = false;
                        dtstaccodes.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        pnlSION.Visible = false;
                        GetAllCaseLawsTableAdapter CLyear = new GetAllCaseLawsTableAdapter();
                        DataTable dtCLyear = CLyear.GetYearsByCategory(category);
                        if (dtCLyear.Rows.Count > 0)
                        {
                            ltlCaselwas.Text = string.Empty;

                            foreach (DataRow CL in dtCLyear.Rows)
                            {
                                int CLuniqueyear = (int)CL["Year"];
                                GetAllCaseLawsTableAdapter CLNumber = new GetAllCaseLawsTableAdapter();
                                DataTable dtCLNumber = CLyear.GetCLNumByYear(category, CLuniqueyear);
                                if (dtCLNumber.Rows.Count > 0)
                                {
                                    string CLmaxNumberforyears = dtCLNumber.Rows[0]["maxclnum"].ToString();

                                    int CLmaxNumberforyear = Convert.ToInt32(CLmaxNumberforyears);

                                    if (CLmaxNumberforyear > 0)
                                    {
                                        int c = 1,i=0, d = 50;
                                        ltlCaselwas.Text += "<table class='citation'><tr><th colspan='3' align='center'>Citation of Year&nbsp;" + CLuniqueyear + "</th></tr><tr>";
                                        for (int v = CLmaxNumberforyear; v > 0; )
                                        {
                                            v = v - 50;
                                            ltlCaselwas.Text += "<td align='center'><a href=displayindex.aspx?CLnum1=" + d + "&CLnum2=" + c + "&year=" + CLuniqueyear + "&cat=Central%20Excise&subcat=Case%20Laws>" + c + "-" + d + "</a></td>";
                                            if (++i % 3 == 0)
                                            {
                                                ltlCaselwas.Text += "</tr><tr>";
                                            }
                                            c = c + 50;
                                            d = d + 50;
                                        }
                                        ltlCaselwas.Text += "</tr>";
                                        ltlCaselwas.Text += "</table><br/><br/>";

                                    }

                                }
                            }

                        }

                    }

                    else
                    {
                        InvisibleRuleLabels();
                        InvisibleFormLabels();
                        dlIndex.Visible = true;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlOthers.Visible = false;
                        //invisible forms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlDGFT.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;
                        //invisible SEZ
                        gvSEZ.Visible = false;
                        //invisible ServiceTax Data
                        gvservicetaxforms.Visible = false;
                        gvstacts.Visible = false;
                        gvstrules.Visible = false;
                        dtstaccodes.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false; dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        dlantidumpingduty.Visible = false;
                        pnlSION.Visible = false;
                        CEActsTableAdapter index = new CEActsTableAdapter();
                        DataTable dtActsIndexName = index.CEIndex(subcategory);
                        if (dtActsIndexName.Rows.Count > 0)
                        {
                            dlIndex.DataSource = dtActsIndexName;
                            dlIndex.DataBind();
                        }
                    }

                    #endregion
                }
                if (category == "Service Tax")
                {
                    #region ServiceTax
                    if (category == "Service Tax" & subcategory == "Act 1994")
                    {
                        InvisibleFormLabels();
                        dlIndex.Visible = false;
                        //visible rules
                        dlAgreements.Visible = false;
                        gvstacts.Visible = true;
                        //  dlBaggage.Visible = true;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlOthers.Visible = false;
                        //invisible froms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlDGFT.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;
                        //invisible SEZ
                        gvSEZ.Visible = false;
                        pnlCEManual.Visible = false;

                        // lblAgreements.Text = "Central Excise Rules";
                        // lblBaggage.Text = "Rescinded or Superseded Rules";
                        lblCustomDrawBack.Visible = false;
                        lblCustomValuation.Visible = false;
                        lblOthers.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;
                        pnlSTTaxation.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        dlantidumpingduty.Visible = false;
                        pnlSION.Visible = false;

                        ServiceTax_GetAll1TableAdapter index = new ServiceTax_GetAll1TableAdapter();

                        DataTable dtIndex = index.STAct_Index_Select(subcategory);
                        dtIndex.Columns.Add("IsDoc");
                        foreach (DataRow dr in dtIndex.Rows)
                        {
                            dr["IsDoc"] = dr["Data"] == null || dr["Data"].ToString() == string.Empty;
                        }
                        gvstacts.DataSource = dtIndex;
                        gvstacts.DataBind();

                    }
                    else if (category == "Service Tax" & subcategory == "ST Rules")
                    {
                        InvisibleRuleLabels();
                        dlIndex.Visible = false;
                        //invisible rules
                        dlAgreements.Visible = false;
                        gvstrules.Visible = true;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlDGFT.Visible = false;
                        dlOthers.Visible = false;
                        //visible froms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;
                        lblAppeals.Visible = false;
                        lblApplicationForm.Visible = false;
                        lblBill.Visible = false;
                        lblBonds.Visible = false;

                        lblDrawback.Visible = false;
                        lblOthersApplicationForms.Visible = false;
                        lblRefunds.Visible = false;
                        lblSettlementCommission.Visible = false;
                        lblShipping.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        dlantidumpingduty.Visible = false;

                        //invisible SEZ
                        gvSEZ.Visible = false;

                        pnlSTlibraries.Visible = false;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        pnlSION.Visible = false;
                        ServiceTax_GetAll1TableAdapter indexrules = new ServiceTax_GetAll1TableAdapter();

                        DataTable dtIndex = indexrules.STRules_Index_Select(subcategory);
                        dtIndex.Columns.Add("IsDoc");
                        foreach (DataRow dr in dtIndex.Rows)
                        {
                            dr["IsDoc"] = dr["Data"] == null || dr["Data"].ToString() == string.Empty;
                        }
                        gvstrules.DataSource = dtIndex;
                        gvstrules.DataBind();
                    }
                    else if (category == "Service Tax" & subcategory == "Forms and Registers")
                    {
                        InvisibleRuleLabels();
                        InvisibleFormLabels();
                        //invisible all
                        dlIndex.Visible = false;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlOthers.Visible = false;
                        //invisible forms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlDGFT.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;
                        //visible SEZ
                        gvSEZ.Visible = false;
                        gvservicetaxforms.Visible = true;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        dlantidumpingduty.Visible = false;
                        pnlSION.Visible = false;
                        ServiceTax_GetAll1TableAdapter indexforms = new ServiceTax_GetAll1TableAdapter();

                        DataTable dtIndexForms = indexforms.STForms_Index_Select(subcategory);
                        dtIndexForms.Columns.Add("IsDoc");
                        foreach (DataRow dr in dtIndexForms.Rows)
                        {
                            dr["IsDoc"] = dr["Data"] == null || dr["Data"].ToString() == string.Empty;
                        }
                        gvservicetaxforms.DataSource = dtIndexForms;
                        gvservicetaxforms.DataBind();
                    }
                    else if (category == "Service Tax" & subcategory == "Accounting Codes for new services")
                    {
                        InvisibleRuleLabels();
                        // VisibleFormLabels();
                        dlIndex.Visible = false;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dtstaccodes.Visible = true;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlOthers.Visible = false;
                        //visible froms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlDGFT.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;

                        lblAppeals.Visible = false;
                        lblApplicationForm.Visible = false;
                        lblBill.Visible = false;
                        lblBonds.Visible = false;

                        lblDrawback.Visible = false;
                        lblOthersApplicationForms.Visible = false;
                        lblRefunds.Visible = false;
                        lblSettlementCommission.Visible = false;
                        lblShipping.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;

                        //invisible SEZ
                        gvSEZ.Visible = false;
                        pnlSTlibraries.Visible = false;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        dlantidumpingduty.Visible = false;
                        pnlSION.Visible = false;

                        ServiceTax_GetAll1TableAdapter indexaccountcodes = new ServiceTax_GetAll1TableAdapter();

                        DataTable dtIndexindexaccountcodes = indexaccountcodes.STAccountcode_Index_Select(subcategory);
                        dtstaccodes.DataSource = dtIndexindexaccountcodes;
                        dtstaccodes.DataBind();
                    }

                    else if (category == "Service Tax" & subcategory == "Case Laws")
                    {
                        InvisibleRuleLabels();
                        // VisibleFormLabels();
                        dlIndex.Visible = false;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dtstaccodes.Visible = false;
                        dlBaggage.Visible = false;
                        dlDGFT.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlOthers.Visible = false;
                        //visible froms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;

                        lblAppeals.Visible = false;
                        lblApplicationForm.Visible = false;
                        lblBill.Visible = false;
                        lblBonds.Visible = false;

                        lblDrawback.Visible = false;
                        lblOthersApplicationForms.Visible = false;
                        lblRefunds.Visible = false;
                        lblSettlementCommission.Visible = false;
                        lblShipping.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        dlantidumpingduty.Visible = false;

                        //invisible SEZ
                        gvSEZ.Visible = false;

                        pnlSTlibraries.Visible = false;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        pnlSION.Visible = false;
                        GetAllCaseLawsTableAdapter CLyear = new GetAllCaseLawsTableAdapter();
                        DataTable dtCLyear = CLyear.GetYearsByCategory(category);
                        if (dtCLyear.Rows.Count > 0)
                        {
                            ltlCaselwas.Text = string.Empty;

                            foreach (DataRow CL in dtCLyear.Rows)
                            {
                                int CLuniqueyear = (int)CL["Year"];
                                GetAllCaseLawsTableAdapter CLNumber = new GetAllCaseLawsTableAdapter();
                                DataTable dtCLNumber = CLyear.GetCLNumByYear(category, CLuniqueyear);
                                if (dtCLNumber.Rows.Count > 0)
                                {
                                    string CLmaxNumberforyears = dtCLNumber.Rows[0]["maxclnum"].ToString();

                                    int CLmaxNumberforyear = Convert.ToInt32(CLmaxNumberforyears);

                                    if (CLmaxNumberforyear > 0)
                                    {
                                        int c = 1, i = 0, d = 50;
                                        ltlCaselwas.Text += "<table class='citation'><tr><th colspan='3' align='center'>Citation of Year&nbsp;" + CLuniqueyear + "</th></tr><tr>";
                                        for (int v = CLmaxNumberforyear; v > 0; )
                                        {
                                            v = v - 50;
                                            ltlCaselwas.Text += "<td align='center'><a href=displayindex.aspx?CLnum1=" + d + "&CLnum2=" + c + "&year=" + CLuniqueyear + "&cat=Service%20Tax&subcat=Case%20Laws>" + c + "-" + d + "</a></td>";
                                            if (++i % 3 == 0)
                                            {
                                                ltlCaselwas.Text += "</tr><tr>";
                                            }
                                            c = c + 50;
                                            d = d + 50;
                                        }
                                        ltlCaselwas.Text += "</tr>";
                                        ltlCaselwas.Text += "</table><br/><br/>";

                                    }

                                }
                            }

                        }

                    }

                    else if (category == "Service Tax" & subcategory == "Taxation of Services An Educational Guide")
                    {
                        InvisibleRuleLabels();
                        // VisibleFormLabels();
                        dlIndex.Visible = false;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dtstaccodes.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlOthers.Visible = false;
                        //visible froms
                        dlRefunds.Visible = false;
                        dlDGFT.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;

                        lblAppeals.Visible = false;
                        lblApplicationForm.Visible = false;
                        lblBill.Visible = false;
                        lblBonds.Visible = false;

                        lblDrawback.Visible = false;
                        lblOthersApplicationForms.Visible = false;
                        lblRefunds.Visible = false;
                        lblSettlementCommission.Visible = false;
                        lblShipping.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;

                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        dlantidumpingduty.Visible = false;
                        //invisible SEZ
                        gvSEZ.Visible = false;

                        pnlSTlibraries.Visible = false;
                        pnlSTTaxation.Visible = true;
                        pnlCEManual.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        pnlSION.Visible = false;
                    }
                    else if (category == "Service Tax" & subcategory == "Notifications")
                    {
                        InvisibleRuleLabels();
                        InvisibleFormLabels();
                        dlIndex.Visible = true;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlOthers.Visible = false;
                        //invisible forms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;
                        //invisible SEZ
                        gvSEZ.Visible = false;
                        //invisible ServiceTax Data
                        gvservicetaxforms.Visible = false;
                        gvstacts.Visible = false;
                        gvstrules.Visible = false;
                        dtstaccodes.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = true;
                        dlSTN.Visible = true;
                        pnlITActsInterest.Visible = false;
                        dlantidumpingduty.Visible = true;
                        pnlSION.Visible = false;
                        STN_GetAllTableAdapter styear = new STN_GetAllTableAdapter();
                        DataTable dtstnYear = styear.STN_Index();
                        if (dtstnYear.Rows.Count > 0)
                        {
                            dlSTN.DataSource = dtstnYear;
                            dlSTN.DataBind();
                        }

                    }

                    else
                    {
                        InvisibleRuleLabels();
                        InvisibleFormLabels();
                        dlIndex.Visible = true;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlOthers.Visible = false;
                        //invisible forms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;
                        //invisible SEZ
                        gvSEZ.Visible = false;
                        //invisible ServiceTax Data
                        gvservicetaxforms.Visible = false;
                        gvstacts.Visible = false;
                        gvstrules.Visible = false;
                        dtstaccodes.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        pnlITActsInterest.Visible = false;
                        dlantidumpingduty.Visible = false;
                        pnlSION.Visible = false;
                        //CEActsTableAdapter index = new CEActsTableAdapter();
                        //DataTable dtActsIndexName = index.CEIndex(subcategory);
                        //if (dtActsIndexName.Rows.Count > 0)
                        //{
                        //    dlIndex.DataSource = dtActsIndexName;
                        //    dlIndex.DataBind();
                        //}
                    }

                    #endregion
                }
                if (category == "Library")
                {

                    #region Library

                    // VisibleRuleLabels();
                    InvisibleFormLabels();
                    dlIndex.Visible = false;
                    //visible rules
                    dlAgreements.Visible = false;
                    dlBaggage.Visible = true;
                    dlCustomDrawBack.Visible = false;
                    dlCustomValuation.Visible = false;
                    dlOthers.Visible = false;
                    //invisible froms
                    dlRefunds.Visible = false;
                    dlAppeals.Visible = false;
                    dlDrawback.Visible = false;
                    dlOthersApplicationForms.Visible = false;
                    dlShipping.Visible = false;
                    dllBill.Visible = false;
                    dlBonds.Visible = false;
                    dlDGFT.Visible = false;
                    dlSettlementCommission.Visible = false;
                    dlSTCaseLaws.Visible = false;
                    //invisible SEZ
                    gvSEZ.Visible = false;
                    //invisible ServiceTax Data
                    gvservicetaxforms.Visible = false;
                    gvstacts.Visible = false;
                    gvstrules.Visible = false;
                    dtstaccodes.Visible = false;
                    pnlCEManual.Visible = false;
                    //invisible Circular/Instruction Headings
                    lblCircularHeading.Visible = false;
                    lblInstructionHeading.Visible = false;

                    lblAgreements.Text = string.Empty;

                    if (subcategory == "Central Excise")
                    {
                        lblBaggage.Text = "Rescinded or Superseded Rules";
                    }
                    if (subcategory == "Service Tax")
                    {
                        lblBaggage.Text = "Service Tax Libraries";
                    }
                    if (subcategory == "Customs")
                    {
                        lblBaggage.Text = "Custom Libraries";
                    }
                    if (subcategory == "Income Tax")
                    {
                        lblBaggage.Text = "Income Tax Libraries";
                    }
                    if (subcategory == "DGFT")
                    {
                        lblBaggage.Text = "DGFT Libraries";
                    }

                    lblCustomDrawBack.Visible = false;
                    lblCustomValuation.Visible = false;
                    lblOthers.Visible = false;
                    pnlSTlibraries.Visible = false;
                    pnlSTTaxation.Visible = false;
                    dlITActs.Visible = false;

                    dltariff.Visible = false;
                    dlnontariff.Visible = false;
                    dlsafeguards.Visible = false;
                    dlCECothers.Visible = false;
                    dlSTN.Visible = false;
                    dlantidumpingduty.Visible = false;
                    pnlSION.Visible = false;
                    pnlITActsGift.Visible = false;
                    pnlITActsInterest.Visible = false;

                    Library_SelectAllTableAdapter indexselect = new Library_SelectAllTableAdapter();
                    DataTable dtBaggage = indexselect.Library_Index_Select(subcategory);

                    // Library_RSRules_SelectAllTableAdapter indexByHeadings = new Library_RSRules_SelectAllTableAdapter();
                    //  DataTable dtBaggage = indexByHeadings.RSRules_Index(subcategory);
                    dlBaggage.DataSource = dtBaggage;
                    dlBaggage.DataBind();
                    #endregion
                }

                if (category == "Income Tax")
                {
                    #region Income Tax
                    if (subcategory == "Income Tax Act" || subcategory == "Wealth Tax Act" || subcategory == "Expenditure Tax Act")
                    {
                        dlITActs.Visible = true;

                        InvisibleRuleLabels();
                        // VisibleFormLabels();
                        dlIndex.Visible = false;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dtstaccodes.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlDGFT.Visible = false;
                        dlOthers.Visible = false;
                        //visible froms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;

                        lblAppeals.Visible = false;
                        lblApplicationForm.Visible = false;
                        lblBill.Visible = false;
                        lblBonds.Visible = false;

                        lblDrawback.Visible = false;
                        lblOthersApplicationForms.Visible = false;
                        lblRefunds.Visible = false;
                        lblSettlementCommission.Visible = false;
                        lblShipping.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;

                        //invisible SEZ
                        gvSEZ.Visible = false;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        dlantidumpingduty.Visible = false;
                        pnlSION.Visible = false;
                        IncomeTaxActs_SelectAllTableAdapter getITDetails = new IncomeTaxActs_SelectAllTableAdapter();
                        DataTable dtGetITDetails = getITDetails.GetIndex(subcategory);
                        if (dtGetITDetails.Rows.Count > 0)
                        {
                            dtGetITDetails.Columns.Add("IsDoc");
                            foreach (DataRow dr in dtGetITDetails.Rows)
                            {
                                dr["IsDoc"] = "False";
                            }
                            dlITActs.DataSource = dtGetITDetails;
                            dlITActs.DataBind();
                        }
                    }
                    if (subcategory == "Finance Act")
                    {
                        dlITActs.Visible = false;

                        InvisibleRuleLabels();
                        // VisibleFormLabels();
                        dlIndex.Visible = false;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dtstaccodes.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlDGFT.Visible = false;
                        dlOthers.Visible = false;
                        //visible froms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;

                        lblAppeals.Visible = false;
                        lblApplicationForm.Visible = false;
                        lblBill.Visible = false;
                        lblBonds.Visible = false;

                        lblDrawback.Visible = false;
                        lblOthersApplicationForms.Visible = false;
                        lblRefunds.Visible = false;
                        lblSettlementCommission.Visible = false;
                        lblShipping.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        dlantidumpingduty.Visible = false;
                        //invisible SEZ
                        gvSEZ.Visible = false;

                        pnlSTlibraries.Visible = true;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        pnlSTlibraries.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        pnlSION.Visible = false;
                        IncomeTaxActs_SelectAllTableAdapter getITDetails = new IncomeTaxActs_SelectAllTableAdapter();
                        DataTable dtGetITDetails = getITDetails.GetFinanceActsDetails(subcategory);
                        if (dtGetITDetails.Rows.Count > 0)
                        {
                            ltlIndex.Text = "<table width='100%'>";
                            string _group = string.Empty;
                            string _indexName = string.Empty;
                            foreach (DataRow drGetITDetails in dtGetITDetails.Rows)
                            {
                                string group = drGetITDetails["Groups"].ToString();
                                string indexName = drGetITDetails["IndexName"].ToString();

                                if (_group != group)
                                {
                                    ltlIndex.Text += "<tr height='10px'><td align='center' style='background-color:#D9D9D9;font-size:1.4em;'>" + group + "<br/><br/></td></tr>";
                                }
                                ltlIndex.Text += "<tr><td style='font-size:10.0pt;font-family:Verdana,sans-serif;mso-bidi-font-family:Times'><a href='shownotifications.aspx?name=" + indexName + "+&cat=" + category + "&subcat=" + subcategory + "'>" + indexName + "</a><br/><br/></td></tr>";
                                _group = group;
                            }
                            ltlIndex.Text += "</table>";
                        }
                    }
                    if (subcategory == "Interest Tax Act")
                    {
                        pnlITActsInterest.Visible = true;

                        InvisibleRuleLabels();
                        // VisibleFormLabels();
                        dlIndex.Visible = false;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dtstaccodes.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlDGFT.Visible = false;
                        dlOthers.Visible = false;
                        //visible froms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;

                        lblAppeals.Visible = false;
                        lblApplicationForm.Visible = false;
                        lblBill.Visible = false;
                        lblBonds.Visible = false;

                        lblDrawback.Visible = false;
                        lblOthersApplicationForms.Visible = false;
                        lblRefunds.Visible = false;
                        lblSettlementCommission.Visible = false;
                        lblShipping.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        dlantidumpingduty.Visible = false;
                        //invisible SEZ
                        gvSEZ.Visible = false;

                        pnlSTlibraries.Visible = true;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        pnlSTlibraries.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlSION.Visible = false;
                    }

                    if (subcategory == "Gift Tax Act")
                    {
                        pnlITActsGift.Visible = true;

                        InvisibleRuleLabels();
                        // VisibleFormLabels();
                        dlIndex.Visible = false;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dtstaccodes.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlDGFT.Visible = false;
                        dlOthers.Visible = false;
                        //visible froms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;

                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        dlantidumpingduty.Visible = false;
                        lblAppeals.Visible = false;
                        lblApplicationForm.Visible = false;
                        lblBill.Visible = false;
                        lblBonds.Visible = false;

                        lblDrawback.Visible = false;
                        lblOthersApplicationForms.Visible = false;
                        lblRefunds.Visible = false;
                        lblSettlementCommission.Visible = false;
                        lblShipping.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;

                        //invisible SEZ
                        gvSEZ.Visible = false;

                        pnlSTlibraries.Visible = true;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        pnlSTlibraries.Visible = false;
                        dlITActs.Visible = false;
                        pnlITActsInterest.Visible = false;
                        pnlSION.Visible = false;

                    }
                    if (subcategory == "Income Tax Rules" || subcategory == "Other Direct Tax Rules")
                    {
                        dlITActs.Visible = true;

                        InvisibleRuleLabels();
                        // VisibleFormLabels();
                        dlIndex.Visible = false;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dtstaccodes.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlDGFT.Visible = false;
                        dlOthers.Visible = false;
                        //visible froms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;

                        lblAppeals.Visible = false;
                        lblApplicationForm.Visible = false;
                        lblBill.Visible = false;
                        lblBonds.Visible = false;

                        lblDrawback.Visible = false;
                        lblOthersApplicationForms.Visible = false;
                        lblRefunds.Visible = false;
                        lblSettlementCommission.Visible = false;
                        lblShipping.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;

                        //invisible SEZ
                        gvSEZ.Visible = false;

                        pnlSTlibraries.Visible = true;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        pnlSTlibraries.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        dlantidumpingduty.Visible = false;
                        pnlSION.Visible = false;

                        IncomeTaxRules_SelectAllTableAdapter getITDetails = new IncomeTaxRules_SelectAllTableAdapter();
                        DataTable dtGetITDetails = getITDetails.GetIndex(subcategory);
                        if (dtGetITDetails.Rows.Count > 0)
                        {
                            dtGetITDetails.Columns.Add("IsDoc");
                            foreach (DataRow dr in dtGetITDetails.Rows)
                            {
                                dr["IsDoc"] = "False";
                            }
                            dlITActs.DataSource = dtGetITDetails;
                            dlITActs.DataBind();
                        }
                    }
                    if (subcategory == "Circulars" || subcategory == "Notifications")
                    {
                        dlITActs.Visible = true;

                        InvisibleRuleLabels();
                        // VisibleFormLabels();
                        dlIndex.Visible = false;
                        //invisible rules
                        dlAgreements.Visible = false;
                        dtstaccodes.Visible = false;
                        dlBaggage.Visible = false;
                        dlCustomDrawBack.Visible = false;
                        dlCustomValuation.Visible = false;
                        dlDGFT.Visible = false;
                        dlOthers.Visible = false;
                        //visible froms
                        dlRefunds.Visible = false;
                        dlAppeals.Visible = false;
                        dlDrawback.Visible = false;
                        dlOthersApplicationForms.Visible = false;
                        dlShipping.Visible = false;
                        dllBill.Visible = false;
                        dlBonds.Visible = false;
                        dlSettlementCommission.Visible = false;
                        dlSTCaseLaws.Visible = false;

                        lblAppeals.Visible = false;
                        lblApplicationForm.Visible = false;
                        lblBill.Visible = false;
                        lblBonds.Visible = false;

                        lblDrawback.Visible = false;
                        lblOthersApplicationForms.Visible = false;
                        lblRefunds.Visible = false;
                        lblSettlementCommission.Visible = false;
                        lblShipping.Visible = false;
                        //invisible Circular/Instruction Headings
                        lblCircularHeading.Visible = false;
                        lblInstructionHeading.Visible = false;
                        pnlSTlibraries.Visible = false;

                        //invisible SEZ
                        gvSEZ.Visible = false;
                        pnlSTTaxation.Visible = false;
                        pnlCEManual.Visible = false;
                        pnlITActsGift.Visible = false;
                        pnlITActsInterest.Visible = false;
                        dltariff.Visible = false;
                        dlnontariff.Visible = false;
                        dlsafeguards.Visible = false;
                        dlCECothers.Visible = false;
                        dlSTN.Visible = false;
                        dlantidumpingduty.Visible = false;
                        pnlSION.Visible = false;
                        IncomeTaxCircularsNotification_SelectAllTableAdapter getITDetails = new IncomeTaxCircularsNotification_SelectAllTableAdapter();
                        DataTable dtGetITDetails = getITDetails.GetIndex(subcategory);
                        if (dtGetITDetails.Rows.Count > 0)
                        {
                            dtGetITDetails.Columns.Add("IsDoc");
                            foreach (DataRow dr in dtGetITDetails.Rows)
                            {
                                dr["IsDoc"] = dr["Data"] == null || dr["Data"].ToString() == string.Empty;
                            }
                            dlITActs.DataSource = dtGetITDetails;
                            dlITActs.DataBind();
                        }
                    }
                    #endregion
                }
                if (category == "DGFT" && subcategory == "FTDR Notifications")
                {
                    #region DGFFTDR

                    InvisibleRuleLabels();
                    InvisibleFormLabels();
                    //invisible all
                    dlIndex.Visible = false;
                    //invisible rules
                    dlAgreements.Visible = false;
                    dlBaggage.Visible = false;
                    dlCustomDrawBack.Visible = false;
                    dlCustomValuation.Visible = false;
                    dlOthers.Visible = false;
                    //invisible forms
                    dlRefunds.Visible = false;
                    dlAppeals.Visible = false;
                    dlDrawback.Visible = false;
                    dlOthersApplicationForms.Visible = false;
                    dlShipping.Visible = false;
                    dllBill.Visible = false;
                    dlBonds.Visible = false;
                    dlSettlementCommission.Visible = false;
                    dlSTCaseLaws.Visible = false;
                    //visible SEZ
                    gvSEZ.Visible = false;
                    //invisible ServiceTax Data
                    gvservicetaxforms.Visible = false;
                    gvstacts.Visible = false;
                    gvstrules.Visible = false;
                    dtstaccodes.Visible = false;
                    //invisible Circular/Instruction Headings
                    lblCircularHeading.Visible = false;
                    lblInstructionHeading.Visible = false;
                    pnlSTlibraries.Visible = false;
                    pnlSTTaxation.Visible = false;
                    pnlCEManual.Visible = false;
                    dlDGFT.Visible = true;
                    dlITActs.Visible = false;
                    pnlITActsGift.Visible = false;
                    pnlITActsInterest.Visible = false;
                    dlantidumpingduty.Visible = false;
                    pnlSION.Visible = false;

                    dltariff.Visible = false;
                    dlnontariff.Visible = false;
                    dlsafeguards.Visible = false;
                    dlCECothers.Visible = false;
                    dlSTN.Visible = false;
                    DGFT_FTDR_Notifications_GetAllTableAdapter indexBySubCategeory = new DGFT_FTDR_Notifications_GetAllTableAdapter();
                    DataTable dtDGFTFTDR = indexBySubCategeory.DGFT_FTDRNotification_Index(subcategory);
                    dlDGFT.DataSource = dtDGFTFTDR;
                    dlDGFT.DataBind();

                    #endregion

                } if (category == "DGFT" && subcategory == "FTP")
                {
                    #region DGFFTP

                    InvisibleRuleLabels();
                    InvisibleFormLabels();
                    //invisible all
                    dlIndex.Visible = false;
                    //invisible rules
                    dlAgreements.Visible = false;
                    dlBaggage.Visible = false;
                    dlCustomDrawBack.Visible = false;
                    dlCustomValuation.Visible = false;
                    dlOthers.Visible = false;
                    //invisible forms
                    dlRefunds.Visible = false;
                    dlAppeals.Visible = false;
                    dlDrawback.Visible = false;
                    dlOthersApplicationForms.Visible = false;
                    dlShipping.Visible = false;
                    dllBill.Visible = false;
                    dlBonds.Visible = false;
                    dlSettlementCommission.Visible = false;
                    dlSTCaseLaws.Visible = false;
                    //visible SEZ
                    gvSEZ.Visible = false;
                    //invisible ServiceTax Data
                    gvservicetaxforms.Visible = false;
                    gvstacts.Visible = false;
                    gvstrules.Visible = false;
                    dtstaccodes.Visible = false;
                    //invisible Circular/Instruction Headings
                    lblCircularHeading.Visible = false;
                    lblInstructionHeading.Visible = false; dlantidumpingduty.Visible = false;
                    pnlSTlibraries.Visible = false;
                    pnlSTTaxation.Visible = false;
                    pnlCEManual.Visible = false;
                    dlDGFT.Visible = true;
                    dlITActs.Visible = false;
                    pnlITActsGift.Visible = false;
                    pnlITActsInterest.Visible = false;
                    pnlSION.Visible = false;

                    dltariff.Visible = false;
                    dlnontariff.Visible = false;
                    dlsafeguards.Visible = false;
                    dlCECothers.Visible = false;
                    dlSTN.Visible = false;
                    DGFT_GetAllTableAdapter indexBySubCategeory = new DGFT_GetAllTableAdapter();
                    DataTable dtDGFTFTP = indexBySubCategeory.DGFT_FTP_Inde_select(subcategory);
                    dlDGFT.DataSource = dtDGFTFTP;
                    dlDGFT.DataBind();

                    #endregion
                }

                if (category == "DGFT" && subcategory == "public notices")
                {
                    #region DGFTpublicnotices

                    InvisibleRuleLabels();
                    InvisibleFormLabels();
                    //invisible all
                    dlIndex.Visible = false;
                    //invisible rules
                    dlAgreements.Visible = false;
                    dlBaggage.Visible = false;
                    dlCustomDrawBack.Visible = false;
                    dlCustomValuation.Visible = false;
                    dlOthers.Visible = false;
                    //invisible forms
                    dlRefunds.Visible = false;
                    dlAppeals.Visible = false;
                    dlDrawback.Visible = false;
                    dlOthersApplicationForms.Visible = false;
                    dlShipping.Visible = false;
                    dllBill.Visible = false;
                    dlBonds.Visible = false;
                    dlSettlementCommission.Visible = false;
                    dlSTCaseLaws.Visible = false;
                    //visible SEZ
                    gvSEZ.Visible = false;
                    //invisible ServiceTax Data
                    gvservicetaxforms.Visible = false;
                    gvstacts.Visible = false;
                    gvstrules.Visible = false;
                    dtstaccodes.Visible = false;
                    //invisible Circular/Instruction Headings
                    lblCircularHeading.Visible = false;
                    lblInstructionHeading.Visible = false;
                    pnlSTlibraries.Visible = false;
                    pnlSTTaxation.Visible = false;
                    pnlCEManual.Visible = false;
                    dlDGFT.Visible = true;
                    dlITActs.Visible = false;
                    pnlITActsGift.Visible = false; dlantidumpingduty.Visible = false;
                    pnlITActsInterest.Visible = false;
                    pnlSION.Visible = false;
                    dltariff.Visible = false;
                    dlnontariff.Visible = false;
                    dlsafeguards.Visible = false;
                    dlCECothers.Visible = false;
                    dlSTN.Visible = false;

                    DGFT_GetAllTableAdapter indexBySubCategeory = new DGFT_GetAllTableAdapter();
                    DataTable dtDGFTpublicnotice = indexBySubCategeory.DGFT_publicnotices_Index_select();
                    dlDGFT.DataSource = dtDGFTpublicnotice;
                    dlDGFT.DataBind();
                    #endregion

                }
                if (category == "DGFT" && subcategory == "SION")
                {
                    #region DGFTSION

                    pnlSION.Visible = true;

                    InvisibleRuleLabels();
                    InvisibleFormLabels();
                    //invisible all
                    dlIndex.Visible = false;
                    //invisible rules
                    dlAgreements.Visible = false;
                    dlBaggage.Visible = false;
                    dlCustomDrawBack.Visible = false;
                    dlCustomValuation.Visible = false;
                    dlOthers.Visible = false;
                    //invisible forms
                    dlRefunds.Visible = false;
                    dlAppeals.Visible = false;
                    dlDrawback.Visible = false;
                    dlOthersApplicationForms.Visible = false;
                    dlShipping.Visible = false;
                    dllBill.Visible = false;
                    dlBonds.Visible = false;
                    dlSettlementCommission.Visible = false;
                    dlSTCaseLaws.Visible = false;
                    //visible SEZ
                    gvSEZ.Visible = false;
                    //invisible ServiceTax Data
                    gvservicetaxforms.Visible = false;
                    gvstacts.Visible = false;
                    gvstrules.Visible = false;
                    dtstaccodes.Visible = false;
                    //invisible Circular/Instruction Headings
                    lblCircularHeading.Visible = false;
                    lblInstructionHeading.Visible = false; dlantidumpingduty.Visible = false;
                    pnlSTlibraries.Visible = false;
                    pnlSTTaxation.Visible = false;
                    pnlCEManual.Visible = false;
                    dlDGFT.Visible = false;
                    dlITActs.Visible = false;
                    pnlITActsGift.Visible = false;
                    pnlITActsInterest.Visible = false;

                    dltariff.Visible = false;
                    dlnontariff.Visible = false;
                    dlsafeguards.Visible = false;
                    dlCECothers.Visible = false;
                    dlSTN.Visible = false;

                    #endregion
                }

            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            category = Request.QueryString["cat"];
            subcategory = Request.QueryString["subcat"];
            indexName = Request.QueryString["name"];
            year = Request.QueryString["year"];
            notification = Request.QueryString["notification"];
            caselawnum1 = Request.QueryString["CLnum1"];
            caselawnum2 = Request.QueryString["CLnum2"];

            #region Customs Tariff

            if (category == "Customs" & subcategory == "Tariff 2012-13")
            {
                Custom_Tariff_IndexnameTableAdapter index = new Custom_Tariff_IndexnameTableAdapter();
                DataTable dtChapterbyIndex = index.Custom_Tariff_ChapterbyIndex(indexName);
                if (dtChapterbyIndex.Rows.Count > 0)
                {
                    ltlIndex.Text = "<table>";
                    string _Subgroup = string.Empty;
                    string _schemes = string.Empty;
                    foreach (DataRow drChapterbyIndex in dtChapterbyIndex.Rows)
                    {
                        string subgroup = drChapterbyIndex["SubGroup"].ToString();
                        string schemes = drChapterbyIndex["Schemes"].ToString();
                        string chaptername = drChapterbyIndex["chaptername"].ToString();
                        string subject = drChapterbyIndex["subjects"].ToString();

                        if (_Subgroup != subgroup)
                        {
                            ltlIndex.Text += "<tr><td align='center' style='background-color:#D9D9D9;font-size:1.4em;'>" + subgroup + "<br/><br/></td></tr>";
                        }
                        if (_schemes != schemes)
                        {
                            ltlIndex.Text += "<tr><td align='left' style='font-size:10.0pt;font-family:Verdana,sans-serif;mso-bidi-font-family:Times;color:#943634';><br/><br/>" + schemes + "<br/><br/></td></tr>";
                        }
                        ltlIndex.Text += "<tr><td style='font-size:10.0pt;font-family:Verdana,sans-serif;mso-bidi-font-family:Times'><a href='shownotifications.aspx?cat=" + category + "&subcat=" + subcategory + "&chaptername=" + chaptername + "'>" + chaptername + "</a><br/>" + subject + "<br/><br/><br/></td></tr>";
                        _Subgroup = subgroup;
                        _schemes = schemes;
                    }
                    ltlIndex.Text += "</table>";
                }
            }
            #endregion

            #region Central Excise Tariff

            else if (category == "Central Excise" & subcategory == "Tariff 2012-13")
            {
                CentralExcise_Tariff_GetAllTableAdapter index = new CentralExcise_Tariff_GetAllTableAdapter();
                DataTable dtChapterbyIndex = index.CE_Tariff_ChapterByIndex(indexName);
                if (dtChapterbyIndex.Rows.Count > 0)
                {
                    ltlIndex.Text = "<table>";
                    string _Subgroup = string.Empty;
                    foreach (DataRow drChapterbyIndex in dtChapterbyIndex.Rows)
                    {
                        string subgroup = drChapterbyIndex["SubGroup"].ToString();
                        string chaptername = drChapterbyIndex["chaptername"].ToString();
                        string subject = drChapterbyIndex["subjects"].ToString();

                        if (_Subgroup != subgroup)
                        {
                            ltlIndex.Text += "<tr><td align='center' style='background-color:#D9D9D9;font-size:1.4em;'>" + subgroup + "<br/><br/></td></tr>";
                        }

                        ltlIndex.Text += "<tr><td style='font-size:10.0pt;font-family:Verdana,sans-serif;mso-bidi-font-family:Times'><a href='shownotifications.aspx?cat=" + category + "&subcat=" + subcategory + "&chaptername=" + chaptername + "'>" + chaptername + "</a><br/>" + subject + "<br/><br/><br/></td></tr>";
                        _Subgroup = subgroup;

                    }
                    ltlIndex.Text += "</table>";
                }
            }

            #endregion

            #region Circulars/Instructions
            else if (subcategory == "Circulars/Instructions")
            {
                if (indexName == "Circulars")
                {
                    gvindexcircularvalues();
                }
                else if (indexName == "Instructions")
                {
                    gvindexinstructionvalues();
                }
            }
            #endregion

            #region CECnotifications
            else if (subcategory == "Notifications" & (category == "Customs" || category == "Central Excise"))
            {
                CECNotifications();
            }
            #endregion

            #region STNotifications
            else if (subcategory == "Notifications" && category == "Service Tax")
            {
                STNotifications();
            }
            #endregion

            #region Caselaws

            else if (subcategory == "Case Laws" || subcategory == "Case")
            {

                lblCL.Text = category+"&nbsp;Case Laws";

                ltlCL.Text += "<table class='citation'><tr><th align='center'>Citation of Year&nbsp;" + year + "</td></tr><tr><td align='center'>";
                ltlCL.Text += caselawnum2 + "-" + caselawnum1 ;
                ltlCL.Text += "</td></tr></table><br/><br/>";

                GetAllCaseLawsTableAdapter getall = new GetAllCaseLawsTableAdapter();
                DataTable dtgetall = getall.GetCitationNum(category, Convert.ToInt32(year), Convert.ToInt32(caselawnum1),Convert.ToInt32(caselawnum2));

                if (dtgetall.Rows.Count > 0)
                {
                    ltlCLheadnotes.Text = string.Empty;
                    foreach (DataRow drcitation in dtgetall.Rows)
                    {
                        string TGOLcitationnum = drcitation["TGOLCitation"].ToString(), APPELLANTParty = drcitation["APPELLANTParty"].ToString(), RESPONDENTParty = drcitation["RESPONDENTParty"].ToString();
                        string HeadNotes = drcitation["HeadNotes"].ToString(), DateofDecision =((System.DateTime)drcitation["DateofDecision"]).ToString("dd-MMMM-yyyy");

                        ltlCLheadnotes.Text += "<table class='citation citCon'>";
                        ltlCLheadnotes.Text += "<tr><td align='center'><a href=shownotifications.aspx?citation=" + TGOLcitationnum + "&cat=" + category + "&subcat=" + subcategory+">" + TGOLcitationnum + "</a></td></tr>";
                        ltlCLheadnotes.Text += "<tr><td align='center'>" + APPELLANTParty + " <span>Vs.</span> " + RESPONDENTParty + "<br/>(Dated:&nbsp;" + DateofDecision + ")</td></tr>";
                        ltlCLheadnotes.Text += "<tr><td style='text-align:justify;font-weight:normal'>" + HeadNotes + "</td></tr></table><br/>";
                    }
                }

            }

            #endregion

            else
            {
                Bindgvindex(subcategory, indexName);
            }
        }