Spark show logged in user

Posted by Jose on Stack Overflow See other posts from Stack Overflow or by Jose
Published on 2010-05-17T17:57:52Z Indexed on 2010/05/17 18:00 UTC
Read the original article Hit count: 302

How do I show the username of the person logged in within a Spark View?

The default MVC view engine had a Page object that you could get the info from.

How would I do that in spark?

I know that I could put the info into the viewdata dictionary, which is probably the best, but I don't want to have to write

ViewData["User"] = myUser;

before I return from EVERY action method.

I'd like some feedback

© Stack Overflow or respective owner

Related posts about asp.net-mvc-2

Related posts about asp.net-mvc