Monday, May 24, 2010

Visual C# Question.?

How would I display a messagebox or error event if I have a textbox with a button and a webBrowser on my form and the button was clicked with no text to navigate to the webBrowser. Would I use an if/else statement and if I did need that how would I do it.

Visual C# Question.?
if (textBox1.Text = "")


{


MessageBox.Show("No URL");


}


else


{


//Navigate to URL


}


No comments:

Post a Comment