在Defalut.aspx.cs中给处理程序添加代码如下:
public partial class_Default:System.Web.UI.Page
{
protected void buttonSubmit_Click(object sender,EventArgs e)
{
string selectedEvent = dropDownListEvents.SelectedValue;
string firstname = textFirstname.Text;
string lastname = textLastname.text;
string email = textEmail.Text;
labelResult.Text = firstname + "" + lastname + "selected the event " + selectedEvent ;
}
}
public partial class_Default:System.Web.UI.Page
{
protected void buttonSubmit_Click(object sender,EventArgs e)
{
string selectedEvent = dropDownListEvents.SelectedValue;
string firstname = textFirstname.Text;
string lastname = textLastname.text;
string email = textEmail.Text;
labelResult.Text = firstname + "" + lastname + "selected the event " + selectedEvent ;
}
}