ASP.NET Page /ContactUs.aspx (C#)
Uses Code Behind Page Page /ContactUs.aspx.cs (C#)
1: <%@ Page Language="C#" MasterPageFile="~/Master/MasterPage.master" AutoEventWireup="true" Inherits="_ContactUs" Codebehind="ContactUs.aspx.cs" %>  
2: <asp:Content ID="MainContent" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">  
3:   
4: <!-- Dependencies -->  
5: <script src="Include/jquery.js" type="text/javascript"></script>  
6: <script src="Include/jquery.ui.draggable.js" type="text/javascript"></script>  
7:   
8: <!-- Core files -->  
9: <script src="Include/jquery.alerts.js" type="text/javascript"></script>  
10: <link href="Include/jquery.alerts.css" rel="stylesheet" type="text/css" media="screen" />  
11:   
12: <script type="text/javascript">  
13:   
14:     function ShowAlert() {  
15:         $(document).ready(function () {  
16:             jAlert('Thank for your message', 'Contact Us saved');  
17:         });  
18:     }              
19: </script>  
20:   
21: <table style="height: 100%" class="Inner_Table" width="100%" border="0" align="center">  
22:     <td valign="top">  
23:         <table class="Content_Table" border="0" align="center" width="60%" cellpadding="5">  
24:         <tr>  
25:             <td><asp:Label runat="server" ID="lbl1" Text="Name"></asp:Label></td>  
26:             <td><asp:TextBox runat="server" ID="txtName" Width="50%"></asp:TextBox>  
27:                 <asp:RequiredFieldValidator ID="errName" runat="server" ControlToValidate="txtName"  
28:                     ErrorMessage="Please enter a name"></asp:RequiredFieldValidator></td>  
29:         </tr>  
30:         <tr>  
31:             <td><asp:Label runat="server" ID="lbl2" Text="Email"></asp:Label></td>  
32:             <td>  
33:                 <asp:TextBox runat="server" ID="txtEmail" Width="50%"></asp:TextBox>  
34:                 <asp:RequiredFieldValidator ID="errEmail" runat="server" Display="Dynamic" ErrorMessage="Please enter an Email address" ControlToValidate="txtEmail"></asp:RequiredFieldValidator>  
35:                 <asp:RegularExpressionValidator ID="regEmail" runat="server" Display="Dynamic" ErrorMessage="Invalid Email format" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ControlToValidate="txtEmail"></asp:RegularExpressionValidator>  
36:             </td>  
37:         </tr>                              
38:         <tr>  
39:             <td><asp:Label runat="server" ID="lbl3" Text="Subject"></asp:Label></td>  
40:             <td><asp:TextBox runat="server" ID="txtSubject" Width="90%"></asp:TextBox></td>  
41:         </tr>                              
42:         <tr>  
43:             <td><asp:Label runat="server" ID="lbl4" Text="Message"></asp:Label></td>  
44:             <td><asp:TextBox runat="server" TextMode="MultiLine" Rows="5" ID="txtMessage" Width="90%"></asp:TextBox></td>  
45:         </tr>    
46:         <tr>  
47:             <td colspan=2>  
48:                 <center><asp:Button runat="server" ID="txtSend" Text="Send" OnClick="txtSend_Click" /></center>  
49:             </td>  
50:         </tr>                                                        
51:           
52:         </table>      
53:     </td>  
54: </table>  
55: </asp:Content>

.NET Documentation Tool is © 2002 - 2009 Winnersh Triangle Web Solutions Limited.