Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7684363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:00:25+00:00 2026-05-31T19:00:25+00:00

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

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T19:00:26+00:00Added an answer on May 31, 2026 at 7:00 pm

    If Web-based:
    I don’t think a static class’ll work as the values will be application-wide in scope and thus not attached to a specific user but the last user that logged in

    Sinple solution would be to put them in some sort of session variable

    Possibly better method would be to create an Authentication Cookie and attach the necessary values to that – and I’m in the wrong place for fishing out a quick example (sorry)

    If WinApp based:
    Yes – just create a public static class with static properties – the static constructor will run the first time you attempt to use the class …

    Quick example:

        // Syntax may be a bit ropey
    public static class LoginDetails {
    public static string Username { get; set; }
    public static int UnitID { get; set; } public static string Password { get; set; } }

    This can be used just as:

        // Assign the value
        LoginDetails.Password = password;
        // Get the value
        string password = LoginDetails.Password
        

    Cos it’s a static, you never need to initialise it with “new”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So, I have set up a login page that verifies the user's credentials, and
I have a page that is trying to login a user. at the top
I have a login page that I would like to show in https. After
I'm new to web development. I have a login.aspx page that has an Asp.Net
I have a login page that uses ASP.NET membership. Once I've validated the user
I have a login page that return the userName to a page called User.aspx.
I have a login page that has several textboxes on the page, one of
I'm using ASP.NET MVC 2 and have a login page that is secured via
I have written a django page that requires only super users to login. So
I have a simple web page that till now didn't need any login. It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.