Jump to content
Tuts 4 You
Sign in to follow this  
Lexity

[Help] Split Char Login Error webclient idk lol

Rate this topic

Recommended Posts

Lexity

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();

 

Share this post


Link to post
Share on other sites
atom0s

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

Share this post


Link to post
Share on other sites
Lexity
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.

Share this post


Link to post
Share on other sites
atom0s

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. 

Share this post


Link to post
Share on other sites
Lexity
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

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×
×
  • Create New...