Jump to content

Object reference not set to an instance of an object


betul

Recommended Posts

Hi,I created a datalist in a master page and used this page in Default.aspx, when I open the browser it gives this error;Object reference not set to an instance of an object.The error belongs to;

			conn.Open();			adapter.Fill(d, "Categories");			menuList.DataSource = new DataView(d.Tables[0]);	  //this line 			menuList.DataBind();

When I remove masterpage and bind the datalist in Default.aspx.cs with the same code, it works perfect. However I don't want to bind it in each page again and again.. What might be the problem?Thanks.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...