Click here to Skip to main content
       

.NET Framework

 
AnswerRe: Private byte is being increased continuously without any request Pinmemberjschell24-Dec-12 7:57 
QuestionMSI not taking/Installing .NET framework Pinmembersjs4u19-Dec-12 17:25 
AnswerRe: MSI not taking/Installing .NET framework PinmvpDave Kreskowiak19-Dec-12 18:55 
QuestionEntity Framework is Updating other column also Pinmemberindian14319-Dec-12 15:51 
QuestionUnable to start program http://localhost:1837/default.aspx using VS 2008 in Windows XP IE 8 [modified] Pinmembersr15918-Dec-12 23:26 
SuggestionRe: Unable to start program http://localhost:1837/default.aspx using VS 2008 in Windows XP IE 8 PinmvpRichard MacCutchan18-Dec-12 23:52 
QuestionCustomer Hacking System Time PinmemberKlockness18-Dec-12 4:33 
AnswerRe: Customer Hacking System Time PinmvpRichard MacCutchan18-Dec-12 6:46 
GeneralRe: Customer Hacking System Time PinmemberKlockness18-Dec-12 10:25 
AnswerRe: Customer Hacking System Time PinmemberRichard Deeming18-Dec-12 7:32 
GeneralRe: Customer Hacking System Time PinmemberKlockness18-Dec-12 10:26 
QuestionCan only book for yourself and not other users? PinmemberxnaLearner17-Dec-12 1:26 
AnswerRe: Can only book for yourself and not other users? PinmvpRichard MacCutchan17-Dec-12 3:27 
Questionusing [Authorize] mvc3 PinmemberxnaLearner17-Dec-12 1:02 
So at the top of my controllers i've added in [Authorize], So far so good only logged in users can access these pages (Person and Holiday)
 
However the tabs in the homeController which navigate the users to these pages are still displayed...coming from the layout.cs
 
      <li>@Html.ActionLink("Home", "Index", "Home")</li>
            <li>@Html.ActionLink("About", "About", "Home")</li>
            <li>@Html.ActionLink("Person", "Index", "Person")</li>
            <li>@Html.ActionLink("Holidays", "Index", "Holidays")</li>
How can I only get these tabs to display if a user is logged in.
 
I have tried the approach of adding in a bool in the AccountController.cs
else
                    {
                        loggedIn = true;
                        return RedirectToAction("Index", "Home");
                    }
                }
                else
                {
                    loggedIn = false;
                    ModelState.AddModelError("", "The user name or password provided is incorrect.");
                }
but then how do I access this from the layout.cs?
 
Is this the correct approach. Please advise. thanks
QuestionRe: using [Authorize] mvc3 PinmemberEddy Vluggen17-Dec-12 1:08 
AnswerRe: using [Authorize] mvc3 PinmemberxnaLearner17-Dec-12 1:25 
QuestionAdding a flash webcam photo capture Pinmemberlhsunshine16-Dec-12 19:33 
AnswerRe: Adding a flash webcam photo capture PinmemberEddy Vluggen17-Dec-12 0:42 
GeneralRe: Adding a flash webcam photo capture Pinmemberlhsunshine17-Dec-12 1:55 
AnswerRe: Adding a flash webcam photo capture PinmemberEddy Vluggen17-Dec-12 2:01 
GeneralRe: Adding a flash webcam photo capture Pinmemberlhsunshine17-Dec-12 2:07 
QuestionRe: Adding a flash webcam photo capture PinmemberEddy Vluggen17-Dec-12 2:09 
AnswerRe: Adding a flash webcam photo capture Pinmemberlhsunshine17-Dec-12 13:49 
AnswerRe: Adding a flash webcam photo capture PinmemberEddy Vluggen18-Dec-12 2:01 
GeneralRe: Adding a flash webcam photo capture Pinmemberlhsunshine18-Dec-12 18:03 
GeneralRe: Adding a flash webcam photo capture Pinmemberlhsunshine18-Dec-12 19:18 
GeneralRe: Adding a flash webcam photo capture PinmemberEddy Vluggen18-Dec-12 20:40 
GeneralRe: Adding a flash webcam photo capture Pinmemberlhsunshine19-Dec-12 2:28 
QuestionSplitting a url PinmemberEl daniel14-Dec-12 22:02 
Questionpulling across value from list to display in view PinmemberxnaLearner14-Dec-12 5:58 
AnswerRe: pulling across value from list to display in view PinmemberxnaLearner14-Dec-12 6:49 
AnswerRe: pulling across value from list to display in view Pinmemberfrazzle-me14-Dec-12 17:41 
GeneralRe: pulling across value from list to display in view PinmemberxnaLearner15-Dec-12 8:28 
Questionproblem with relationships PinmemberxnaLearner13-Dec-12 2:45 
AnswerRe: problem with relationships PinmemberRichard Deeming13-Dec-12 3:48 
GeneralRe: problem with relationships PinmemberxnaLearner13-Dec-12 4:37 
Question[VB.NET 2008] DataSet and XML files Pinmembersteve_949661313-Dec-12 0:06 
AnswerRe: [VB.NET 2008] DataSet and XML files PinmemberEddy Vluggen13-Dec-12 4:28 
GeneralRe: [VB.NET 2008] DataSet and XML files Pinmembersteve_949661313-Dec-12 21:21 
GeneralRe: [VB.NET 2008] DataSet and XML files PinmemberEddy Vluggen14-Dec-12 0:34 
QuestionAssembly with different .NET framework versions Pinmembermarca29212-Dec-12 10:05 
AnswerRe: Assembly with different .NET framework versions PinmemberGerry Schmitz12-Dec-12 12:25 
QuestionUse A Cookie To Send PersonID To Different Page PinmemberxnaLearner12-Dec-12 4:33 
Questiondont allow user to select existing date PinmemberxnaLearner10-Dec-12 5:46 
AnswerRe: dont allow user to select existing date PinprotectorPete O'Hanlon10-Dec-12 5:53 
GeneralRe: dont allow user to select existing date PinmemberxnaLearner10-Dec-12 6:23 
GeneralRe: dont allow user to select existing date PinmemberxnaLearner10-Dec-12 23:26 
GeneralRe: dont allow user to select existing date PinprotectorPete O'Hanlon10-Dec-12 23:32 
GeneralRe: dont allow user to select existing date PinmemberxnaLearner10-Dec-12 23:46 
GeneralRe: dont allow user to select existing date PinprotectorPete O'Hanlon10-Dec-12 23:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.140826.1 | Last Updated 26 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid