182
Programming Languages for mis
Listing6.28 shows an example of ASP.NET with C# that involves various HTML
controls, including the HTML submit button, textbox, checkbox, and radio but-
ton controls. As a comparison, Listing6.29 shows a similar example that employs
various web controls, including the Button, TextBox, CheckBoxList, and
RadioButtonList web controls. It demonstrates that web controls can have more
advanced features than HTML controls do.
Listing6.28: ASP.NET Program (Coffee1.aspx) with HTML Controls
<%@ Page Language="C#" %>
<script runat="server">
public void Order(Object sender, EventArgs e)
{
label1.Text = "Thank you! " + textbox1.Value + ". ";
if ((chk1.Checked) && (chk2.Checked))
{ label1.Text = label1.Text + "You have ordered ...