Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

c# - saving and retrieving values from session state in asp.net -


i reviewing web code , not sure how asp.net session state works. helps gratefully appreciated.

if user object saved session state during login, , user.firstname , user.lastname set. if other web pages retrieve user object session , set firstname else persisted on other web pages? or, need re-add user object session once has been modified? thanks

session persisted on server, tracked via client. repeat - via client.

in cases, sessions tracked cookies. using example, when user object saved session:

session["userinfo"] = new user { firstname = "joe", lastname = "bloggs" }; 

a cookie sent client unique identifier. cookie passed along further http requests client/browser unless expires.

if user comes along (from different machine) first time, session["userinfo"] null.

an alternative cookies "cookieless-session" - instead of using cookie store session identifer - identifier tacked onto url.

so answer no - other web pages (e.g other clients/machines/browsers) not have access information.

if want information shared between different clients web server, use cache.

however given context of question (user information), valid store information in session, relevant particular user (shouldn't shared).

an alternative lot of people use instead of sticking user info in session, put in generic principle get's attached forms authentication ticket.

up road choose.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -