Jump to content
Tuts 4 You

[Help] Split Char Login Error webclient idk lol


Lexity

Recommended Posts

Posted

So basically when I put nothing in the username and pass box It works, but when I put wrong shit, It fails.

Does any one know how to fix this login problem for my program?

Login Source Code:

string test = materialSingleLineTextField1.Text + ":" + materialSingleLineTextField2.Text;
            if (new WebClient().DownloadString("--CENSORED--").Contains(test))
                
            {
                MessageBox.Show("Success");
                new Form2().Show();
                base.Hide();
                

            }
            else
            {
                MessageBox.Show("Failed");
                base.Close();

 

Posted

Check if the text boxes are empty, if so do not allow it to try and login.

Posted
53 minutes ago, atom0s said:

Check if the text boxes are empty, if so do not allow it to try and login.

idk man i tried that but it keeps giving me error so i kind of quit and tried asking forum people.

Posted

What you are asking is fairly basic level coding for this kind of thing. If you are having issues with that, it sounds like you are not really ready for what you are actually working on.

You can check string lengths via . Length property of a string. Which in your case 'materialSingleLineTextField1.Text' would have the .Length property you can use. You can also use 'string.IsNullOrEmpty' to check if either text boxes string is empty. 

Posted
13 minutes ago, atom0s said:

What you are asking is fairly basic level coding for this kind of thing. If you are having issues with that, it sounds like you are not really ready for what you are actually working on.

You can check string lengths via . Length property of a string. Which in your case 'materialSingleLineTextField1.Text' would have the .Length property you can use. You can also use 'string.IsNullOrEmpty' to check if either text boxes string is empty. 

thenx but i fixed problemmmmmmmmmm im try8ing to make hwid thing now ok thank you

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...