Can someone show me how to use a static class to move data across web pages?
moving data across web pages in C#
Collapse
X
-
Originally posted by wboswYes, I can use Session, wanted info on using a static class.
I don't think that designing a static class to do this would be particle for moving data between web pages...there's nothing stopping you from trying it out though.
I'd suggest using Session instead...since you're considering using server side objects anyways....and Session is already developed and used by many people.
Cheers!
-FrinnyComment
-
Originally posted by wboswUsing Profile probably is the best way to do this because it is strongly typed, where Session isn't strongly typed. Just wanted to try and use a static class. Thank you all for all your suggestions.
Why would you suggest Profile?
Profile is a way to store information unique to the user, sure, but:- you have to store the information into a database using a unique user identifier
- and you have be able to recognize users when they visit again so that you can then fetch the user information.... .
Using Session is a lot easier for simply passing information between pages.....and a Session Identifier is set up automatically.. ..and you don't have to use a database if you don't want to.
Why are you choosing to use Profile?Comment
-
Originally posted by FrinavaleProfile?
Why would you suggest Profile?
Profile is a way to store information unique to the user, sure, but:- you have to store the information into a database using a unique user identifier
- and you have be able to recognize users when they visit again so that you can then fetch the user information.... .
Using Session is a lot easier for simply passing information between pages.....and a Session Identifier is set up automatically.. ..and you don't have to use a database if you don't want to.
Why are you choosing to use Profile?
If i'm not using Profile to store specific info on a user, but just to move data across pages. Using Profile, gives me the use of intellisense, because Profile properties are strongly typed. I appreciate all the advice and will add you to my Buddy list for future discussions.
Thanks
wboswComment
Comment