bubai banerjee30 reputationPosted Feb 1, 2017, 2:05 AM EST
0
@Saineshwar Bageri
i want these values because i want to hide/show my "li" menu for different user login.
for example, if account user login i want to show only "Account " tab. and for other user login i want to show all the tabs except "Account " tab.
0
Bikesh SrivastavaRank #108 · 20.3K reputationPosted Feb 1, 2017, 3:30 AM EST
0
You can use code like this.
$(".xyz").on('click','li',function (){
alert($(this).text());
});
0
Bryian TanRank #396 · 6.3K reputationPosted Feb 1, 2017, 4:54 AM EST
0
I think you can do something like below? I'm not sure how your project being structured but the ViewBag.UserLogin / "Account" can be replace by a model, session object, etc...
or if HttpContext.Current.User.IsInRole("Account") ... I would suggest try with the simplest approach first.
ravi verma85 reputationPosted Jan 31, 2017, 8:48 PM EST
Saineshwar BageriRank #115 · 19.6K reputationPosted Jan 31, 2017, 8:13 PM EST
bubai banerjee30 reputationPosted Feb 1, 2017, 2:05 AM EST
Bikesh SrivastavaRank #108 · 20.3K reputationPosted Feb 1, 2017, 3:30 AM EST
Bryian TanRank #396 · 6.3K reputationPosted Feb 1, 2017, 4:54 AM EST
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts