![]() |
#2
仰望星空2008-09-19 20:43
|
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
VoteClassDataContext db = new VoteClassDataContext();
var votes = (from v in db.VoteItem where v.TitleID == Int32.Parse(
Request.QueryString["titleid"].ToString()) select v.ItemCount).Sum();
VoteCount = votes;
}
}
错误提示:用户代码未处理 System.NullReferenceException
Message="未将对象引用设置到对象的实例。"