from the ajaxcontrol toolkit sample project:
protected void DropDownList3_SelectedIndexChanged(object sender, EventArgs e)
{
// Get selected values
string make = DropDownList1.SelectedItem.Text;
string model = DropDownList2.SelectedItem.Text;
string color = DropDownList3.SelectedItem.Text;
// Output result string based on which values are specified
if (string.IsNullOrEmpty(make))
{
Label1.Text = "Please select a make.";
}
else if (string.IsNullOrEmpty(model))
{
Label1.Text = "Please select a model.";
}
else if (string.IsNullOrEmpty(color))
{
Label1.Text = "Please select a color.";
}
else
{
Label1.Text = string.Format("You have chosen a {0} {1} {2}. Nice car!", color, make, model);
}
}
你問AJAX是如何工作的,或只是功能的特定的作品呢? –