default.aspx
<%@ Page Language="C#" %>
<!DOCTYPE html>
<script runat="server">
protected void Lookup_Click( object sender, EventArgs e ) {
Result.Text = "Hi " + Name1.Text + ", you selected: " +
Category.SelectedValue;
}
</script>
<body>
<form id="form1" runat="server">
Name: <asp:TextBox ID="Name1" runat="server" />
Category:
<asp:DropDownList ID="Category" runat="server">
<asp:ListItem Selected="True">psychology</asp:ListItem>
<asp:ListItem>business</asp:ListItem>
<asp:ListItem>popular_comp</asp:ListItem>
</asp:DropDownList>
<asp:Button ID="Lookup" runat="server" Text="Lookup" />
<asp:Label ID="Result" runat="server" Text="" />
</form>
</body>
</html> |
|
Web
|