双击Submit按钮,在代码文件中产生btnSubmit_Click事件句柄。如果看不到这个文件,检查一下Solution Explorer上的“Show All Files”是否被选中:

在btnSubmit_Click事件句柄中输入这些代码:
string _response = "Hello {0} {1} from {2}, {3}! Please reset the form!";
string szState = ddlState.SelectedValue; lblResults.Text =
string.Format(_response, txtFirstName, txtLastName, txtCity, szState);
双击btnReset,产生Click句柄,在bntReset_Click句柄中输入这些代码:txtCity.Text = "";然后,在你的工程中添加一个叫做WebParticle.cs的类文件。
txtFirstName.Text = "";
txtLastName.Text = "";
ddlState.SelectedIndex = 0;