Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 07, 2012 01:27 PM by BrockAllen
Member
3 Points
15 Posts
May 07, 2012 07:50 AM|LINK
Hello,
1)Why it is not prefered to use "Session" under asp.net mvc.
2)Why it is not prefered to use server control under asp.net mvc.
Regards,
Gautham
All-Star
24675 Points
4250 Posts
May 07, 2012 08:03 AM|LINK
Gautham.shetty.Kaup 1)Why it is not prefered to use "Session" under asp.net mvc.
It is better to use TempData for things you want to be short lived. There is also no problem using the Session
Gautham.shetty.Kaup 2)Why it is not prefered to use server control under asp.net mvc.
Because there is no ViewState and post backs.
134960 Points
21632 Posts
Moderator
MVP
May 07, 2012 08:07 AM|LINK
Gautham.shetty.Kaup Why it is not prefered to use "Session" under asp.net mvc
Instead of? I use Session when it needs to be used - not where it not needs. PLease clarify
Gautham.shetty.Kaup Why it is not prefered to use server control under asp.net mvc.
Server controls - if you talk about WebForms controls, those does not function in MVC. ( no view state, no events )
27524 Points
4902 Posts
May 07, 2012 01:27 PM|LINK
Session (in all the different web technologies) has issues.
Gautham.shet...
Member
3 Points
15 Posts
Session, server control under asp.net mvc
May 07, 2012 07:50 AM|LINK
Hello,
1)Why it is not prefered to use "Session" under asp.net mvc.
2)Why it is not prefered to use server control under asp.net mvc.
Regards,
Gautham
raduenuca
All-Star
24675 Points
4250 Posts
Re: Session, server control under asp.net mvc
May 07, 2012 08:03 AM|LINK
It is better to use TempData for things you want to be short lived. There is also no problem using the Session
Because there is no ViewState and post backs.
Radu Enuca | Blog
ignatandrei
All-Star
134960 Points
21632 Posts
Moderator
MVP
Re: Session, server control under asp.net mvc
May 07, 2012 08:07 AM|LINK
Instead of? I use Session when it needs to be used - not where it not needs. PLease clarify
Server controls - if you talk about WebForms controls, those does not function in MVC. ( no view state, no events )
BrockAllen
All-Star
27524 Points
4902 Posts
MVP
Re: Session, server control under asp.net mvc
May 07, 2012 01:27 PM|LINK
Session (in all the different web technologies) has issues.
DevelopMentor | http://www.develop.com
thinktecture | http://www.thinktecture.com/