<body>
<form id="form1" runat="server">
<div id="grid">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
PageSize="3" AllowPaging="True"
DataSourceID="SqlDataSource1" CellPadding="2" ForeColor="Black"
GridLines="None" Height="141px" Width="397px"
BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" >
<AlternatingRowStyle BackColor="PaleGoldenrod" />
<Columns>
<asp:TemplateField HeaderText="Id">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#Eval("Id") %>'>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Name">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#Eval("Name") %>'>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="FatherName">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#Eval("Fname") %>'>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Address">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#Eval("Address") %>'>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Photo">
<ItemTemplate>
<asp:Image ID="Image1" runat="server" ImageUrl='<%#Eval("image") %>'> </asp:Image>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="Tan" />
<HeaderStyle BackColor="Tan" Font-Bold="True" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue"
HorizontalAlign="Center" />
<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
<SortedAscendingCellStyle BackColor="#FAFAE7" />
<SortedAscendingHeaderStyle BackColor="#DAC09E" />
<SortedDescendingCellStyle BackColor="#E1DB9C" />
<SortedDescendingHeaderStyle BackColor="#C2A47B" />
</asp:GridView>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ExampleConnectionString3 %>"
SelectCommand="SELECT * FROM [Empolyee]"></asp:SqlDataSource>
</form>
</body>
<form id="form1" runat="server">
<div id="grid">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
PageSize="3" AllowPaging="True"
DataSourceID="SqlDataSource1" CellPadding="2" ForeColor="Black"
GridLines="None" Height="141px" Width="397px"
BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" >
<AlternatingRowStyle BackColor="PaleGoldenrod" />
<Columns>
<asp:TemplateField HeaderText="Id">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#Eval("Id") %>'>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Name">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#Eval("Name") %>'>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="FatherName">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#Eval("Fname") %>'>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Address">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#Eval("Address") %>'>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Photo">
<ItemTemplate>
<asp:Image ID="Image1" runat="server" ImageUrl='<%#Eval("image") %>'> </asp:Image>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="Tan" />
<HeaderStyle BackColor="Tan" Font-Bold="True" />
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue"
HorizontalAlign="Center" />
<SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
<SortedAscendingCellStyle BackColor="#FAFAE7" />
<SortedAscendingHeaderStyle BackColor="#DAC09E" />
<SortedDescendingCellStyle BackColor="#E1DB9C" />
<SortedDescendingHeaderStyle BackColor="#C2A47B" />
</asp:GridView>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ExampleConnectionString3 %>"
SelectCommand="SELECT * FROM [Empolyee]"></asp:SqlDataSource>
</form>
</body>
No comments:
Post a Comment