|
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NormalPaging.aspx.cs" Inherits="VTS.Web.UI.NormalPaging" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<center>
<h4 style="font-family:Verdana;color:Purple">Normal Paging</h4>
<div>
<asp:GridView ID="gvProfile" DataSourceID="profileDataSource" runat="server" AutoGenerateColumns="false" AllowPaging="true" AllowSorting="true" PageSize="5"
HeaderStyle-Font-Names="Verdana" Font-Size="Small" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Font-Underline="false" Width="55%"
HeaderStyle-BackColor="BurlyWood" HeaderStyle-ForeColor="Navy">
<AlternatingRowStyle BackColor="Aquamarine" />
<Columns>
<asp:BoundField DataField="ProfileId" HeaderText="Profile Id" SortExpression="ProfileId" ItemStyle-Width="6%"/>
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" ItemStyle-Width="13%"/>
<asp:BoundField DataField="Address" HeaderText="Address" SortExpression="Address" ItemStyle-Width="18%"/>
<asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" ItemStyle-Width="8%"/>
<asp:BoundField DataField="Mobile" HeaderText="Mobile" SortExpression="Mobile" ItemStyle-Width="9%"/>
<asp:BoundField DataField="IsActive" HeaderText="Status" SortExpression="IsActive" ItemStyle-Width="4%"/>
</Columns>
</asp:GridView>
</div>
</center>
<asp:SqlDataSource ID="profileDataSource" runat="server" ConnectionString = "<%$ ConnectionStrings:ApplicationServices %>"
SelectCommand="SELECT [ProfileId],[Name],[Address],[Email],[Mobile], IsActive = CASE [IsActive] WHEN 1 THEN 'Active' WHEN 0 THEN 'DeActive' END FROM [HR].[dbo].[Profile]" >
</asp:SqlDataSource>
</form>
</body>
</html>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.