Use variables entered in login page usable in multiple pages?

Posted by deception1 on Stack Overflow See other posts from Stack Overflow or by deception1
Published on 2012-03-21T05:09:33Z Indexed on 2012/03/21 5:29 UTC
Read the original article Hit count: 109

I have a Login page that captures User input like this.

 MD5calc ss = new DBCon.MD5calc();
            string gs = ss.CalculateMD5Hash(password.Password);

            int unitID = Convert.ToInt32(Unit_ID.Text);
            logBO.UnitID = unitID;
            logBO.UserID = User_name.Text;
            logBO.UserPass = gs;

How would i make them assignable to any other page i created.My Common sense says that creating a static class would be enough,but will it?If i do create a static class where would i put it and how would i call it?I actually need those variable to use in my Sql Stored procedures.

© Stack Overflow or respective owner

Related posts about c#

Related posts about wpf