例外詳細資訊: System.NullReferenceException: 並未將物件參考設定為物件的執行個體行 15: 發言人:
这种错误怎么避免?
Aspx:
<%=FormatString(dr["question_name"].ToString()).ToString()%>
Cs:
if (ds.Tables["appeal_question"].Rows.Count > 0)
{
dr = ds.Tables["appeal_question"].Rows[0];
}
else
{
Response.Write("no");
}
例外詳細資訊: System.NullReferenceException: 並未將物件參考設定為物件的執行個體
原始程式錯誤:
行 15: 發言人:<%=FormatString(dr["question_name"].ToString()).ToString()%>