Type 'DataSet' is not defined.

Posted on 2006-06-07
Last Modified: 2008-03-06

I have a aspx and ascx when I run the aspx file it generates the following error:

Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30002: Type 'DataSet' is not defined.
Source Error:
Line 3:      Sub Page_Load(ByVal Sender As Object, ByVal E As EventArgs)
Line 4:          Dim dgi As DataGridItem = CType(Me.BindingContainer, DataGridItem)
Line 5:          Dim ds As DataSet = CType(dgi.DataItem, DataSet)
Line 6:          If (Not (TypeOf dgi.DataItem Is DataSet)) Then
Line 7:              Throw New ArgumentException("Please change the TemplateDataMode attribute to 'Table' in the HierarGrid declaration")
Source File: c:\inetpub\wwwroot\Template\Sup.ascx    Line: 5

Question by:RyanBank
    LVL 10

    Assisted Solution


    Read the discussion from following link and has good tips for your problem

    and hope it may help

    LVL 7

    Accepted Solution

    Have you imported System.Data?


    Author Comment


    Work like a charm!

    LVL 7

    Expert Comment

    n/p easily done

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
    Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now