Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 11th, 2009, 08:54 PM
Registered User
 
Join Date: May 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to get value of the control in the previous page?

I am writing an online exam application.After login successfully, the student reaches to the question1.aspx , after answer the question by click the radiobutton, he reaches the question2.aspx....Assume that there are 5 questions, after he answer the question in question5.aspx he reaches the result.aspx.This page will show the student's score.

My problem is : how to get the value of the student's answer in each question( to compare it with the right answer in the database) of all the questionx.aspx and show the result in the result.aspx page.
 
Old May 19th, 2009, 01:14 PM
Authorized User
 
Join Date: May 2006
Posts: 23
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via AIM to pratik28
Thumbs up re:how to get value of the control in the previous page

Well you can always temporarily store the scores for each correct answer in the following manner:

Lets assume 10 is the score for each correct answer

Session["score"]=10;
Session["score"] = (int)Session["score"] + 10;

Finally you can assign the final score to a label control in the following manner:

lblScore.Text=Session["score"].toString();

hope this would be of help.Please don't forget to click thanks button if the suggestion is of real help .
__________________
imspratik





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to expire previous page johnsonlim026 ASP.NET 1.0 and 1.1 Basics 6 May 22nd, 2009 12:05 PM
Previous Control Name wscheiman Access VBA 3 November 8th, 2004 02:03 PM
Checking Previous Page shs BOOK: Beginning ASP.NET 1.0 2 September 23rd, 2004 11:01 PM
next and previous page results mikeuk PHP Databases 1 July 19th, 2004 05:15 AM
go back previous page hosefo81 PHP How-To 2 February 11th, 2004 01:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.