Click here to Skip to main content
15,888,733 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i got 60 question..

i want page to appear 1- 15 questions per page. when clicking button next the page still maintain but the question change to 16-30.PLease help me : (
Posted
Updated 1-Jan-14 18:01pm
v2
Comments
ravikiran from Hyderabad 2-Jan-14 0:03am    
Are you using GridView to display questions....????
Member 10493875 2-Jan-14 2:43am    
no..i create a label (to display question) in panel..
do u have any suggestion or example source code ?

Use Gridview to display questions and then use pagination , for that set AllowPaging="True" for grid view and set PageSize="15", and then write following code on pageindexchanging event of grid view

C#
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
    GridView1.PageIndex = e.NewPageIndex;
    loadgrid(); // function to load gridview

}
 
Share this answer
 
v2
Comments
Member 10493875 2-Jan-14 2:53am    
i have tried to use gridview and pagination as my display and the result is ok.
But how can i add radio button list in gridview so that user can click the answer on gridview display ?
Praveen_P 2-Jan-14 3:44am    
U can add radiobutton list as template field in the grid view . If u are not using gridview then u can place the label displaying question and radio button list inside an update panel
You should use ajax partial rendering feature and for that you should use update panel to disaply questions grid.
And use asynchpostbacktrigger to load next question sets on gridview.

follow this link :http://www.asp.net/web-forms/tutorials/aspnet-ajax/understanding-asp-net-ajax-updatepanel-triggers[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900