script menu login [modified]
-
I have created menu from scripting using
-
tags using this code:-
now on the click of specific menu item i want to check whether user logged in or not.....how to do this............plz guide me a bit......:)
modified on Saturday, October 24, 2009 2:47 AM
-
-
I have created menu from scripting using
-
tags using this code:-
now on the click of specific menu item i want to check whether user logged in or not.....how to do this............plz guide me a bit......:)
modified on Saturday, October 24, 2009 2:47 AM
if You are using forms authentication use this
if (Page.User.Identity.IsAuthenticated)
{
//YourCode
}or if You are using session check the session If this is not your answer Sorry..! Then be More clear..!
LatestArticle :Log4Net Why Do Some People Forget To Mark as Answer .If It Helps.
-
-
if You are using forms authentication use this
if (Page.User.Identity.IsAuthenticated)
{
//YourCode
}or if You are using session check the session If this is not your answer Sorry..! Then be More clear..!
LatestArticle :Log4Net Why Do Some People Forget To Mark as Answer .If It Helps.
thnks for ur reply bro...............but i think u r not getting my question..........i hav created menu in html using UL tag,LI tag, and ANCHOR tag with scripting...............in this condition how to check .......:)
-
thnks for ur reply bro...............but i think u r not getting my question..........i hav created menu in html using UL tag,LI tag, and ANCHOR tag with scripting...............in this condition how to check .......:)
I have 2 questions for this. 1)Why would you go for html tags rather than using Navigation control in asp.net. 2)How You are checking for particular user whether he is logged in or not..!
KhandelwalA wrote:
i hav created menu in html using UL
Then You are redirecting to particular page .Check the login condition. But IMO Its not good. But If you are using forms authentication .:cool:forms authentication will take care of it..! Thts the advantage of forms authentication.
LatestArticle :Log4Net Why Do Some People Forget To Mark as Answer .If It Helps.
-
I have created menu from scripting using
-
tags using this code:-
now on the click of specific menu item i want to check whether user logged in or not.....how to do this............plz guide me a bit......:)
modified on Saturday, October 24, 2009 2:47 AM
If your security system works at all, then a pure link is fine because your page itself will check if the user is logged in. On the other hand, a good design would not show options that the user is not allowed to access. Giving people the URLs to your pages that they can't access, is a good first step to their trying to break in.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-