ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Hide menu item for user<p>i have done it like this .. i took two master age one only for login and another have al pages . then i treid this code it work fine&nbsp;</p> <pre class="brush: csharp"> protected void Page_Load(object sender, EventArgs e) { con.Open(); Label1.Text = Session[&#34;name&#34;].ToString(); string s = &#34;SELECT name,password FROM admin&#34; + &#34; WHERE name=&#39;&#34; + Label1.Text + &#34;&#39;&#34;; SqlCommand cmd = new SqlCommand(s, con); SqlDataReader Dr = cmd.ExecuteReader(); if (Dr.Read()) { Menu4.Visible = true; con.Close(); } else { con.Close(); con.Open(); String q = &#34;SELECT Name,Password FROM user2 &#34; + &#34; WHERE Name=&#39;&#34; + Label1.Text + &#34;&#39;&#34;; SqlCommand cmnd = new SqlCommand(q, con); SqlDataReader Dr1 = cmnd.ExecuteReader(); if (Dr1.Read()) { Menu1.Visible = true; con.Close(); } else { Menu4.Visible = true; } } }</pre> <p><br /><br /></p>https://www.aspforums.net:443/Threads/178873/Hide-menu-item-for-user/https://www.aspforums.net:443/Threads/178873/Hide-menu-item-for-user/Sat, 29 Sep 2012 23:46:11 GMT