int Correct = Convert.ToInt32(Session["Correct"].ToString());
int total = Convert.ToInt32(Session["Wrong"].ToString()) + Convert.ToInt32(Session["Correct"].ToString());
double dbMark = 100 * correct / total;
Response.Write(" " + total.ToString() + " " + dbMark.ToString());
when i run my problem can not function ~

Jaish MathewsRank #225 · 11K reputationPosted Apr 9, 2010, 8:38 PM EDT
You didn't mention the error getting. I am seeing that you haven't your session variables set with some values. Please check below modified code. It's running.
Session["Correct"] = 90;
Session["Wrong"] = 10;
int correct = Convert.ToInt32(Session["Correct"].ToString());
int total = Convert.ToInt32(Session["Wrong"].ToString()) + correct;
double dbMark = 100 * correct / total;
Response.Write(" " + total.ToString() + " " + dbMark.ToString());