0

I have an ASP.NET 4.5 Web Site that I'm creating in VS2012 , and I'm having issues trying to access the strongly typed DataSet that I created for it.

I used the DataSet Designer to create the dataset in the App_Code folder. I know the App_Code fodler is working right, as I'm able to access and use the other C# classes I've created in it. Checking the DatasetName.Designer.cs file, all the code is there, with a namespace of "MySite.App_Code".

As well, the rdlc report that I've created on the site can see and use the dataset as well. Now I'm trying to access the dataset from the code-behind on one of my pages so I can fill it with data and apply it to my report viewer/report, but the editor keep telling me that it's an unknown object/namespace.

Any thoughts?

leppie
  • 115,091
  • 17
  • 196
  • 297
Evan M.
  • 211
  • 1
  • 4
  • 13
  • Show the code for the page that's not working did you check also at the project level right click on properties and what is the default namespace that's there.. make sure all namespaces match up.. – MethodMan Nov 14 '14 at 15:40
  • Which using statements are you using in your code behind?? Usually typed datasets generate some aditional namespaces – cpacheco Nov 14 '14 at 15:40
  • Code-behind pages are using "MySite" namespace. Dataset has namespaces MySite.App_Code and MySite.App_Code.SiteDataSetTableAdapters. The below returns error "The type or namespace name 'App_Code' does not existing in the namespace 'MySite'. using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace MySite { public partial class MyPage : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { MySite.App_Code.SiteDataSet mydataSet = new MySite.App_Code.SiteDataSet(); } } } – Evan M. Nov 14 '14 at 15:57

0 Answers0