JBTALKS.CC
标题:
C# session question
[打印本页]
作者:
youngfei
时间:
2010-4-10 08:17 AM
标题:
C# session question
if (Session["Wrong"] != null)
session["Wrong"] = Convert.ToInt32(Session["Wrong"].ToString()) + 1;
else
Session["Wrong"] = 1;
if (Session["correct"] != null)
session["correct"] = Convert.ToInt32(Session["Wrong"].ToString()) + 1;
else
Session["correct"] = 1;
{
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());}
我要这样set 才对呢~
我做了很久可以还是拿不到答案T。T
作者:
goodday
时间:
2010-4-11 04:32 PM
double dbMark = 100 * correct / total;
问题是在这边 int 要换 double
欢迎光临 JBTALKS.CC (https://www.jbtalks.cc/)
Powered by Discuz! X2.5