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 316:            SqlConnection conn = new SqlConnection(DAL.ConnStr);
Line 317:
Line 318:            SqlCommand cmd = new SqlCommand("select * from tbl_" + DAL.TableName + "_kurstercihleri where id IN(" + ids.TrimEnd(',') + ") order by siralama asc", conn);
Line 319:
Line 320:            try

Source File: c:\inetpub\vhosts\bademmutfak.com\httpdocs\App_Code\KursTercihleri.cs    Line: 318

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   islem.KursTercihleriislem.ListeWhereIN(String ids) in c:\inetpub\vhosts\bademmutfak.com\httpdocs\App_Code\KursTercihleri.cs:318
   icerik_sayfalari.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\bademmutfak.com\httpdocs\kurslar.aspx.cs:139
   System.Web.UI.Control.OnLoad(EventArgs e) +107
   System.Web.UI.Control.LoadRecursive() +89
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1601


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