If Condition ,Boolean,C#,Javascript

Posted by Raja_89 under JavaScript on 8/2/2016 | Points: 10 | Views : 286 | Status : [Member] | Replies : 1
Hai
I am developing an website application which has menu and sub-menus (Asp.net)
Each user has its own set of menus (main menu and sub-menus are link button)
How can i display a menu based on their selected choice in javascript

If he click the link respective page will be shown by checking their identity

Example

Admin

User [Main menu]
1.Add user
2.View User

Clients
1.Add client
2.View client

Raja
For the above user he has view view client only.
Clients
view Client

ISVC=true/False for checking their choice from db
Lbvc=Name of the id of that control in asp.net

If (IsVc=true)
{
LBVc= true;
}

else
{
Viewclient(Main menu).visible=false //Since only one is available for raja so disabling that menu(linkbutton control ) itself
}

I got details from sql db

Output

Home

Client
Submenu
View client


Regards




Responses

Posted by: Joginder on: 8/3/2016 [Member] Starter | Points: 25

Up
0
Down
Hello dear,
This type of requirements you can do with the help of menu control.
<asp:Menu ID="Menu" runat="server" DataSourceID="SiteMapDataSource1" Orientation="Horizontal"
OnMenuItemDataBound="OnMenuItemDataBound">
<LevelMenuItemStyles>
<asp:MenuItemStyle CssClass="main_menu" />
<asp:MenuItemStyle CssClass="level_menu" />
</LevelMenuItemStyles>
</asp:Menu>


For more information ...check this link http://www.aspsnippets.com/Articles/Using-ASPNet-Menu-control-with-example-in-C-and-VBNet.aspx



Raja_89, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response