I have form with menus that are created dynamically from the tables in data base . as follows
public void FourthMenu(ToolStripMenuItem mnu, string submenu)
{
string Seqchild = "SELECT FRM_NAME,FourthMenuID FROM MNU_FOURTH WHERE ThirdMenuID = '" + submenu + "'";
SqlDataAdapter dachildmnu = new SqlDataAdapter(Seqchild, conn);
DataTable dtchild = new DataTable();
dachildmnu.Fill(dtchild);
foreach (DataRow dr in dtchild.Rows)
{
ToolStripMenuItem SSMenu2 = new ToolStripMenuItem(dr["FRM_NAME"].ToString(), null, new EventHandler(ChildClick));
FifthMenu(SSMenu2, dr["FourthMenuID"].ToString());
mnu.DropDownItems.Add(SSMenu2);
}
outputa as shown in fig ..
Requirement is to display menus as per user . for eg if user1 has only authority to visit pages of Accounts and Finance then the menus will be displayed up to the accounts and finance only .
and if user2 has authority to visit page fourth1 , then menus will be displayed upto fourth1 but it should not display "fourth" .
how can i approach it , any article reference etc .....
Thanks in advance......