<%@ Page Language="C#" %>Hello World! <%= "Hello World!" %>
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // populate dropdown list ddlColors.DataSource = new string[] { "Red", "Green", "Blue" }; ddlColors.DataBind(); } } protected void btnSubmit_Click(object sender, EventArgs e) { string selectedColor = ddlColors.SelectedValue; Response.Write("You selected " + selectedColor); }In this example, we are using the Page_Load method to populate a dropdown list with colors, and then using the btnSubmit_Click method to retrieve the selected value and display it on the page. This demonstrates the use of C# Page's event handlers and data binding capabilities. Package Library: System.Web.UI.WebControls