private void Button1_Click(object sender, System.EventArgs e) { //for the page with only one form if(TextBox1.Text!=null && TextBox1.Text!="") MsgBox1.alert("Please input something in the text box."); else MsgBox1.confirm("Hello "+ TextBox1.Text + "! do you want to continue?", "hid_f"); }