'/' 應用程式中發生伺服器錯誤。

並未將物件參考設定為物件的執行個體。

描述: 在執行目前 Web 要求的過程中發生未處理的例外狀況。請檢閱堆疊追蹤以取得錯誤的詳細資訊,以及在程式碼中產生的位置。

例外狀況詳細資訊: System.NullReferenceException: 並未將物件參考設定為物件的執行個體。

原始程式錯誤:


行 268:                dbCmd.Parameters.Add("lang", SqlDbType.Int).Value = displayLanguage;
行 269:                dbCmd.CommandText = "SELECT title FROM products WHERE lang = @lang AND id = @id ";
行 270:                title = dbCmd.ExecuteScalar().ToString();
行 271:
行 272:            }

原始程式檔: d:\www\wisetech-tw.com\httpdocs\product.aspx.cs    行: 270

堆疊追蹤:


[NullReferenceException: 並未將物件參考設定為物件的執行個體。]
   product.Prod_Title(String parent) in d:\www\wisetech-tw.com\httpdocs\product.aspx.cs:270
   product.Page_Init(Object sender, EventArgs e) in d:\www\wisetech-tw.com\httpdocs\product.aspx.cs:77
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnInit(EventArgs e) +97
   System.Web.UI.Page.OnInit(EventArgs e) +14
   System.Web.UI.Control.InitRecursive(Control namingContainer) +142
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +416


版本資訊: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.8.4494.0