可能顯示的文件: What is a NullReferenceException in .NET? System.NullReferenceException: Object reference not set to an instance of an objectSystem.NullReferenceException:對象未設置爲一個對象的一個實例
我使用下面的代碼。
public partial class SectionControls_SingleBanners : SectionControlBaseClass
{
private SingleBanners _section;
protected void Page_PreRender(object sender, EventArgs e) {
updateViews();
if (RssCapable(this._section.GetType()) && _section.BannersEntries.Rows.Count > 0) {
所以這裏這個代碼我收到錯誤
this._section.GetType();
怎麼能這個問題能解決嗎?
上述錯誤現在已經解決了我面對這裏同樣的問題....保護無效btnSaveDetails_Click(對象發件人,EventArgs的){ 的DataRow row = null;如果(ViewState [「編輯」]。ToString()==「新」){ – shafiq 2011-06-02 10:09:45