i am using one tree view control in asp.net, in this tree view i can give the navigation urls in child nodes , my problem is user click the child nodes first check the user login (or) not if the user was logged, open the navigation page other wise open the login page please give me suggestion about that if u have any idea in that topic please..
i click the child node which event fired where i can write the code pls give me example
EDIT
If you have master page , than check for any session vriable like this
here is good example : Redirect to Login page on session expiration (ASP.NET)
Old one
Better way to do it not load those link in treeview control which are not beloging to given user….load those link in treeview which is beloging to given user role …
so your databse query would be like
there is no sense in load links in tree view which are not beloging to given userrol its not good practice.. for end user this not good interface .. we caled this concept as Authorization
you can read and userstand about : ASP.NET Authorization from this msdn link…