-
Notifications
You must be signed in to change notification settings - Fork 0
/
Table.aspx
69 lines (64 loc) · 4.48 KB
/
Table.aspx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Table.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Labelwelcome" runat="server" Text="Welcome ....." Font-Size="Medium" style="text-align: center; font-weight: 700; font-size: xx-large"></asp:Label>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:RegistrationConnectionString %>" SelectCommand="SELECT * FROM [Userdata]" ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM [Userdata] WHERE [Id] = @original_Id AND [Username] = @original_Username AND [Email] = @original_Email AND [Password] = @original_Password AND [Country] = @original_Country" InsertCommand="INSERT INTO [Userdata] ([Id], [Username], [Email], [Password], [Country]) VALUES (@Id, @Username, @Email, @Password, @Country)" OldValuesParameterFormatString="original_{0}" UpdateCommand="UPDATE [Userdata] SET [Username] = @Username, [Email] = @Email, [Password] = @Password, [Country] = @Country WHERE [Id] = @original_Id AND [Username] = @original_Username AND [Email] = @original_Email AND [Password] = @original_Password AND [Country] = @original_Country">
<DeleteParameters>
<asp:Parameter Name="original_Id" Type="String" />
<asp:Parameter Name="original_Username" Type="String" />
<asp:Parameter Name="original_Email" Type="String" />
<asp:Parameter Name="original_Password" Type="String" />
<asp:Parameter Name="original_Country" Type="String" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="Id" Type="String" />
<asp:Parameter Name="Username" Type="String" />
<asp:Parameter Name="Email" Type="String" />
<asp:Parameter Name="Password" Type="String" />
<asp:Parameter Name="Country" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="Username" Type="String" />
<asp:Parameter Name="Email" Type="String" />
<asp:Parameter Name="Password" Type="String" />
<asp:Parameter Name="Country" Type="String" />
<asp:Parameter Name="original_Id" Type="String" />
<asp:Parameter Name="original_Username" Type="String" />
<asp:Parameter Name="original_Email" Type="String" />
<asp:Parameter Name="original_Password" Type="String" />
<asp:Parameter Name="original_Country" Type="String" />
</UpdateParameters>
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="Id" DataSourceID="SqlDataSource1" AllowPaging="True" AllowSorting="True" BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px">
<Columns>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ShowSelectButton="True" />
<asp:BoundField DataField="Id" HeaderText="Id" ReadOnly="True" SortExpression="Id" />
<asp:BoundField DataField="Username" HeaderText="Username" SortExpression="Username" />
<asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
<asp:BoundField DataField="Password" HeaderText="Password" SortExpression="Password" />
<asp:BoundField DataField="Country" HeaderText="Country" SortExpression="Country" />
</Columns>
<FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
<HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
<PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
<RowStyle BackColor="White" ForeColor="#003399" />
<SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
<SortedAscendingCellStyle BackColor="#EDF6F6" />
<SortedAscendingHeaderStyle BackColor="#0D4AC4" />
<SortedDescendingCellStyle BackColor="#D6DFDF" />
<SortedDescendingHeaderStyle BackColor="#002876" />
</asp:GridView>
</div>
<p>
<asp:Button ID="Buttonlogout" runat="server" Text="Logout" OnClick="Buttonlogout_Click" />
</p>
</form>
</body>
</html>