Posted July 22, 20178 yr 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();
July 22, 20178 yr Author 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.
July 23, 20178 yr 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.
July 23, 20178 yr Author 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