How to use ItemTemplate and Paging in asp.net FormView

asp.net FormView example: how to use ItemTemplate and Paging
FormViewExample.aspx

<%@ Page Language="C#" %>

<!DOCTYPE html>

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>asp.net FormView example: how to use ItemTemplate and Paging</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:Red">Example: FormView</h2>
        <asp:SqlDataSource 
            ID="SqlDataSource1"
            runat="server"
            ConnectionString="<%$ ConnectionStrings:PubsConnectionString %>"
            SelectCommand="SELECT emp_id, fname, lname, hire_date FROM employee"
            >
        </asp:SqlDataSource>
        <asp:FormView 
            ID="FormView1"
            runat="server"
            DataSourceID="SqlDataSource1"
            DataKeyNames="emp_id"
            AllowPaging="true"
            >
            <HeaderTemplate>
                Employee Details
            </HeaderTemplate>
            <HeaderStyle
                 BackColor="DarkBlue"
                 ForeColor="AliceBlue" 
                 BorderColor="DarkOrange" 
                 BorderStyle="None"
                 BorderWidth="2"
                 Font-Size="Medium"
                 Font-Italic="false"
                 Font-Bold="true"
                 Height="35"
                 HorizontalAlign="Center"
                 />
            <ItemTemplate>
                <b>Employee ID:</b> <i><%# Eval("emp_id") %></i>
                <br />
                <b>Employee Name:</b> <i><%# Eval("lname") %> <%# Eval("fname") %></i>
                <br />
                <b>Hire Date:</b> <i><%# Eval("hire_date") %></i>
            </ItemTemplate>
            <RowStyle 
                BackColor="DodgerBlue"
                ForeColor="AliceBlue"
                />
            <PagerSettings Mode="NumericFirstLast" FirstPageText="First" LastPageText="Last" />
            <PagerStyle BackColor="DarkBlue" ForeColor="AliceBlue" />
        </asp:FormView>
    </div>
    </form>
</body>
</html>
More asp.net examples