TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
nagaraju
NA
87
129.5k
How to get all the records in gridview after paging
Aug 8 2011 5:21 AM
Hi,
I am having 50 questions in gridview. now i am dispalying 5 questions per page.
now i want to retrieve the user selected answers . but with gridview rows event i can able to access only current page questions. but i want all the questions in all pages. how can i achieve this .
foreach (GridViewRow gvrow in GV_Questionpaper.Rows)
{
RadioButton Option1 = (RadioButton)gvrow.FindControl("RBtn_Option1");
RadioButton Option2 = (RadioButton)gvrow.FindControl("RBtn_Option2");
RadioButton Option3 = (RadioButton)gvrow.FindControl("RBtn_Option3");
RadioButton Option4 = (RadioButton)gvrow.FindControl("RBtn_Option4");
if (Option1.Checked)
{
answer[i] = Option1.Text;
i++;
}
else if (Option2.Checked)
{
answer[i] = Option1.Text;
i++;
}
else if (Option3.Checked)
{
answer[i] = Option1.Text;
i++;
}
else if (Option4.Checked)
{
answer[i] = Option1.Text;
i++;
}
else
{
answer[i] = "Unanswered";
i++;
unanswered++;
}
}
foreach (string str in answer)
{
Response.Write(str+"\n");
}
Thanks&Regards
P.Nagaraju
Reply
Answers (
1
)
Cookie Reteriving problem
Append in Cookie