tags:

views:

83

answers:

1

For example, i have current user logged in and i want to have his info posted in a sidebar like name, dob on every page so how should i do this, and ofcourse the best way posible to do this? im using linq THank you very much

+1  A: 

I think that using Partial Requests or even SubControllers would be appropriate in this case.

Darin Dimitrov
but it's going to have extra SQl, i heard that profile provider does not re-query, im i correct?
DucDigital
If you don't want to hit the database at every request you will need to store the results in the session. With SubControllers you a in total control and you can first check if data is present in user session before querying the database, or even easier, when the user authenticates query the database to get user info and store it in session, then all that's left is read it from the session and show it in some partial view.
Darin Dimitrov
Thanks for the useful info! :)
DucDigital