ASP.NET Page /Admin/ContactUs.aspx (C#)
Uses Code Behind Page Page /Admin/ContactUs.aspx.cs (C#)
1: <%@ Page Language="C#" AutoEventWireup="true" Inherits="Admin_ContactUs" Codebehind="ContactUs.aspx.cs" %>  
2:   
3:   
4:   
5: <html xmlns="http://www.w3.org/1999/xhtml" >  
6: <head runat="server">  
7:     <title>Admin - Contact us maintenance</title>  
8: </head>  
9: <body>  
10:     <form id="form1" runat="server">  
11:     <asp:HyperLink ID="lblHome" runat="server" NavigateUrl="~/Admin/Default.aspx">Home</asp:HyperLink>  
12:     <div>  
13:         <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"  
14:             DataSourceID="SqlDataSource1">  
15:             <Columns>  
16:                 <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />  
17:             </Columns>  
18:         </asp:GridView>  
19:         <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="CompareAllValues" OldValuesParameterFormatString="original_{0}"  
20:             DeleteCommand="DELETE FROM [ContactUs] WHERE [Email] = @original_Email"  
21:             InsertCommand="INSERT INTO [ContactUs] ([SentDate], [Email], [Name], [Subject], [Message]) VALUES (@SentDate, @Email, @Name, @Subject, @Message)"  
22:             SelectCommand="SELECT * FROM [ContactUs] ORDER BY [SentDate], [Email]"  
23:             UpdateCommand="UPDATE [ContactUs] SET [Name] = @Name, [Subject] = @Subject, [Message] = @Message WHERE [SentDate] = @original_SentDate AND [Email] = @original_Email AND [Name] = @original_Name AND [Subject] = @original_Subject AND [Message] = @original_Message">  
24:             <DeleteParameters>  
25:                 <asp:Parameter Name="original_SentDate" Type="DateTime" />  
26:                 <asp:Parameter Name="original_Email" Type="String" />  
27:             </DeleteParameters>  
28:             <UpdateParameters>  
29:                 <asp:Parameter Name="Name" Type="String" />  
30:                 <asp:Parameter Name="Subject" Type="String" />  
31:                 <asp:Parameter Name="Message" Type="String" />  
32:                 <asp:Parameter Name="original_SentDate" Type="DateTime" />  
33:                 <asp:Parameter Name="original_Email" Type="String" />  
34:                 <asp:Parameter Name="original_Name" Type="String" />  
35:                 <asp:Parameter Name="original_Subject" Type="String" />  
36:                 <asp:Parameter Name="original_Message" Type="String" />  
37:             </UpdateParameters>  
38:             <InsertParameters>  
39:                 <asp:Parameter Name="SentDate" Type="DateTime" />  
40:                 <asp:Parameter Name="Email" Type="String" />  
41:                 <asp:Parameter Name="Name" Type="String" />  
42:                 <asp:Parameter Name="Subject" Type="String" />  
43:                 <asp:Parameter Name="Message" Type="String" />  
44:             </InsertParameters>  
45:         </asp:SqlDataSource>  
46:       
47:     </div>  
48:     </form>  
49: </body>  
50: </html>  

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