Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
step -1)when my website open its menu show like this
http://postimg.org/image/yi7lcuoir/[^]
step -2)then aften i click any link then its show like this
http://postimg.org/image/b77a5xiap/[^]
then i click red color text
http://postimg.org/image/xatyzejvb[^]
step-3) then i click which is show in red color this page open but my menu screen close like this
http://postimg.org/image/yi7lcuoir/[^]
but i want like this
http://postimg.org/image/xatyzejvb[^]

and i use this code in master page which all in come in run time
C#
public void BindTree()
  {
      dt.Clear();
      dt = lng.Getlogin_Parent(Session["UserID"].ToString());
      for (i = 0; i < dt.Rows.Count; i++)
      {
          TreeNode no = new TreeNode();
          no.Collapse();
          no.Text = dt.Rows[i]["MENU_DESC"].ToString();
          menuid = Convert.ToInt32(dt.Rows[i]["MENU_ID"]);
          if (dt.Rows[i]["MENU_DESC"].ToString() == "Password Change")
          {
              no.NavigateUrl = "~/PasswordChange/Password/PasswordChange.aspx";
          }
          if (dt.Rows[i]["MENU_DESC"].ToString() == "Exit")
          {
              no.NavigateUrl = "~/Signout.aspx";
          }
          Get_allNodes(no);
          this.tr1.Nodes.Add(no);

      }
  }
  public void Get_allNodes(TreeNode no)
  {
      dt1.Clear();
      dt1 = lng.Getlogin_ParentID(Session["UserID"].ToString(), menuid);
      {
          for (j = 0; j < dt1.Rows.Count; j++)
          {
              TreeNode Child = new TreeNode();
              Child.Collapse();
              Child.Text = dt1.Rows[j]["MENU_DESC"].ToString();
              menuchild = Convert.ToInt32(dt1.Rows[j]["MENU_ID"]);
              if (dt1.Rows[j]["MENU_DESC"].ToString() == "Arrear/AWR Reports")
              {
                  Child.NavigateUrl = "~/Report/ArrearAWRReport/Arrear_report.aspx";
              }

              Get_allNodesSubchild(Child);
              no.ChildNodes.Add(Child);
          }

      }
  }
  public void Get_allNodesSubchild(TreeNode Child)
  {
      dt2.Clear();
      dt2 = lng.Getlogin_ParentID(Session["UserID"].ToString(), menuchild);
      {
          for (k = 0; k < dt2.Rows.Count; k++)
          {
              TreeNode SubChild = new TreeNode();
              SubChild.Collapse();
              SubChild.Text = dt2.Rows[k]["MENU_DESC"].ToString();
              supmenuchild = Convert.ToInt32(dt2.Rows[k]["MENU_ID"]);
              #region
              if (dt2.Rows[k]["MENU_DESC"].ToString() == "Attendance Data Query")
              {
                  SubChild.NavigateUrl = "~/EntryModule/AttendenceModule/AttendanceDataQuery.aspx";
              }
              #endregion
              Get_SuperNodesSubchild(SubChild);
              Child.ChildNodes.Add(SubChild);

          }

      }
  }
  public void Get_SuperNodesSubchild(TreeNode SubChild)
  {
      dt3.Clear();
      dt3 = lng.Getlogin_ParentID(Session["UserID"].ToString(), supmenuchild);
      {
          for (l = 0; l < dt3.Rows.Count; l++)
          {
              TreeNode superchild = new TreeNode();
              superchild.Collapse();
              superchild.Text = dt3.Rows[l]["MENU_DESC"].ToString();
              if (dt3.Rows[l]["MENU_DESC"].ToString() == "Official Master Entry")
              {
                  superchild.NavigateUrl = "~/EntryModule/MasterDataModule/OfficialDataEntry.aspx";
              }

              SubChild.ChildNodes.Add(superchild);
          }
      }
  }


please help me
Posted
Updated 20-Sep-13 9:20am
v2

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900