Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 2040:            finally
Line 2041:            { conn_skufound.Close(); }
Line 2042:            if (dtstockitemids.Rows.Count > 0)
Line 2043:            {
Line 2044:                for (int stki = 0; stki < dtstockitemids.Rows.Count; stki++)

Source File: c:\inetpub\wwwroot\currentMysolitaire\Templates\uc\Template5SearchAlphabet.ascx.cs    Line: 2042

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Templates_uc_Template5SearchAlphabet.DefaultStockcontent() in c:\inetpub\wwwroot\currentMysolitaire\Templates\uc\Template5SearchAlphabet.ascx.cs:2042
   Templates_uc_Template5SearchAlphabet.displayItem(String rec, String selectQry, String dyoimg, String dyolink) in c:\inetpub\wwwroot\currentMysolitaire\Templates\uc\Template5SearchAlphabet.ascx.cs:873
   Templates_uc_Template5SearchAlphabet.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\currentMysolitaire\Templates\uc\Template5SearchAlphabet.ascx.cs:531
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +67
   System.Web.UI.Control.LoadRecursive() +164
   System.Web.UI.Control.LoadRecursive() +164
   System.Web.UI.Control.LoadRecursive() +164
   System.Web.UI.Control.LoadRecursive() +164
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4497


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1055.0