I was searching for pagination example in asp.net, by which i can make the solution for my project online exam, in which user can navigate to the next and previous question and also he/she can directly move to the particular question. I googled this query, and i got the solution paging using gridview. Suggestion and example links will be appreciated, Thanks !!
UPDATED
<asp:GridView ID="gvUserlist" runat="server" AllowPaging="True" AutoGenerateColumns="False"
DataKeyNames="Login_Id" DataSourceID="DSUserList" CellPadding="4" ForeColor="#333333"
GridLines="None" Width="681px">
<RowStyle BackColor="#EFF3FB" />
<Columns>
<asp:BoundField DataField="Login_Id" HeaderText="User Id" ReadOnly="True" SortExpression="Login_Id" />
<asp:BoundField DataField="User_Type" HeaderText="User Type" SortExpression="User_Type" />
<asp:BoundField DataField="First_Name" HeaderText="First Name" SortExpression="First_Name" />
<asp:BoundField DataField="Last_Name" HeaderText="Last Name" SortExpression="Last_Name" />
<asp:TemplateField>
<EditItemTemplate>
<asp:CheckBox ID="cbuserid" runat="server" />
</EditItemTemplate>
<ItemTemplate>
<asp:CheckBox ID="cbuserid" runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#2461BF" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
<asp:SqlDataSource ID="DSUserList" runat="server" ConnectionString="<%$ ConnectionStrings:JPConnString %>"
SelectCommand="SELECT User_Login.Login_Id, User_Login.User_Type, User_Login.Login_Status, derivedtbl_1.First_Name, derivedtbl_1.Last_Name FROM User_Login INNER JOIN (SELECT Email_Id, First_Name, Last_Name FROM User_Info UNION SELECT Email_Id, First_Name, Last_Name FROM Emp_Info) AS derivedtbl_1 ON User_Login.Login_Id = derivedtbl_1.Email_Id WHERE (User_Login.Login_Status = @Login_Status)">
<SelectParameters>
<asp:Parameter DefaultValue="Activate" Name="Login_Status" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
As i earlier mentioned that, i need the pagination for online exam, in which user can navigate to next and preview and data will display in column-wise instead of row-wise. As i know, grid-view show the data in row-wise.
Since, in online exam system, i have to display that data not in tabular form, i just need to move to the next row of the table. and i don't think so, grid-view will help me to solve this problem, because it show the data in tabular form