WebClient wc = new WebClient();
string code = wc.DownloadString("link");
MessageBox.Show(code); // CODE SHOWS IN MESSAGEBOX CORRECTLY.
if (textbox.Text == code)
{
MessageBox.Show("Key Approved!");
try
{
Form1 Form1 = new Form1();
Form1.Show();
this.Hide();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
else
{
MessageBox.Show("This Key is incorrect.");
}
The text inside the Textbox is the Text in the code string, although textbox.Text == code
is false and it returns to the else argument.
Any idea why this is happening?