intro1.aspx.cs (without using code render blocks)
using System;
namespace WebApplication2 {
public partial class WebForm1 : System.Web.UI.Page {
protected void Page_Load( object sender, EventArgs e ) {
}
protected void Lookup_Click( object sender, EventArgs e ) {
}
}
} |
intro1.aspx (using code render blocks)
<%@ Page Language="C#" AutoEventWireup="true"
CodeBehind="intro2.aspx.cs" Inherits="WebApplication2.WebForm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<body><center>
<form ID="form1" runat="server">
<h3>Name: <asp:TextBox ID="Name" 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" Text="Lookup"
OnClick="Lookup_Click" runat="server" />
<asp:Label ID="Result" runat="server" />
</h3>
</form>
</center></body>
</html> |
|
Web
|