The last section of the footer is the most complex, the ASP.NET contact form. It is a structurally sound, CSSed form fieldset.
<!-- This is the Contact Form Section -->
<div id="contactFormWrapper">
<div id="contactForm" class="contactForm">
<img id="contactImage" alt="Contact Us!" height="150px" width="150px" name="rolloverImage" tabindex="0" src="Images/ContactUsBox.jpg" />
<h2>Have a Question? Leave a comment!</h2>
<h4>Add an update, make a suggestion, or report an error.</h4>
<fieldset>
<legend>Contact Us!</legend>
<ol>
<li>
<label for="tbEmail">Email (optional)</label>
<asp:textbox id="tbEmail" runat="server" cssclass="tbEmail" />
</li>
<li>
<label for="tbComments">Questions and Comments</label>
<asp:textbox id="tbComments" runat="server" cssclass="tbComments" textmode="multiLine" />
</li>
<li>
<asp:button id="btnEmail" runat="server" text="Email Us!" CssClass="btnEmail" />
<asp:Label ID="lblSent" runat="server" />
</li>
</ol>
</fieldset>
</div>
</div>
<div id="contactFormSpacer" class="spacer"></div>
This is mostly HTML. First, there are the divs which identify the form. Note the absence of form tags in ASP.NET, since the <form> tags are needed for a webform. Then there is a rollover image and the two headings to attract people's attention and encourage them to respond. There there's the <fieldset> tags. This is the way you formally set up a form (haha), since fieldsets are the only way to have multiple sections of form fields on a page. The <fieldset> tags draw a line metaphorically around the fields in the HTML and quite literally on the page. It's of added significance in ASP.NET since this is the only way to identify the form section, otherwise you have to drop naked form components loose on the page. Then all the form fields are arranged in a list. This is the only section that contains .NET controls and on the page they render like this...
<ol>
<li>
<label for="tbEmail">Email (optional)</label>
<input name="ctl00$tbEmail" type="text" id="ctl00_tbEmail" class="tbEmail" />
</li>
<li>
<label for="tbComments">Questions and Comments</label>
<textarea name="ctl00$tbComments" rows="2" cols="20" id="ctl00_tbComments"
class="tbComments"></textarea>
</li>
<li>
<input type="submit" name="ctl00$btnEmail" value="Email Us!" id="ctl00_btnEmail" class="btnEmail" />
<span id="ctl00_lblSent"></span>
</li>
</ol>
The ASP.NET server controls have in each case been replaced with either text or button <input> tags. Note the id attributes are "mangled" by the master page so as not to conflict with ids in the content page. The id="tbEmail" in the <asp:textbox> tag becomes in the final output both id="ct100_tbEmail" and name="ct100$tbEmail" attributes. Obviously the cssclass attribute renders as a class attribute in the <input> tag with the same name. There is an empty <span> tag which the form processing code will use to display the word "Sent." if the form processes successfully. Also, the text box and text area fields are labeled for accessibility. Note that since the page has been redesigned in a master page, the id which the label specifies for="tbEmail" no longer links to the text box's id="ct100_tbEmail". I'll need to update these attributes in the master page to reflect the new "mangled" values. The ids no longer connect to the respective styles in the style sheets either, and I need to update the "mangled" values in the CSS files.
Skip to Main Points