moving data across web pages in C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wbosw
    New Member
    • Mar 2007
    • 36

    moving data across web pages in C#

    Can someone show me how to use a static class to move data across web pages?
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Originally posted by wbosw
    Can someone show me how to use a static class to move data across web pages?
    Why do you need to use a static class?
    Why can't you use Session or Cookies or Hidden Fields or something?

    Comment

    • wbosw
      New Member
      • Mar 2007
      • 36

      #3
      Yes, I can use Session, wanted info on using a static class.

      Comment

      • aliasruel
        New Member
        • Sep 2007
        • 73

        #4
        HI,

        maybe what you can do is to use a querystring to move data into webpages.

        regards
        ruel


        Originally posted by wbosw
        Can someone show me how to use a static class to move data across web pages?

        Comment

        • Frinavale
          Recognized Expert Expert
          • Oct 2006
          • 9749

          #5
          Originally posted by wbosw
          Yes, I can use Session, wanted info on using a static class.
          Have you seen what MSDN has on static classes and static class members?

          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!

          -Frinny

          Comment

          • wbosw
            New Member
            • Mar 2007
            • 36

            #6
            Using 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.

            Comment

            • Frinavale
              Recognized Expert Expert
              • Oct 2006
              • 9749

              #7
              Originally posted by wbosw
              Using 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.
              Profile?
              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

              • wbosw
                New Member
                • Mar 2007
                • 36

                #8
                Originally posted by Frinavale
                Profile?
                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
                wbosw

                Comment

                Working...