Binding data to a Drop Down List

Discussion in 'ASP .Net' started by =?Utf-8?B?UmljaGFyZCBQaWRjb2Nr?=, Dec 17, 2004.

  1. I'm trying to bind data from a table in a database to a dropdownlist. I can
    successfully add the connection and data adapter but when I add the dataset I
    get and error during build.

    The type or namespace name 'DataSet1' does not exist in the class or
    namespace 'CiscoSpares.CiscoSpares' (are you missing an assembly reference?)

    Any help???
    =?Utf-8?B?UmljaGFyZCBQaWRjb2Nr?=, Dec 17, 2004
    #1
    1. Advertising

  2. Where are you defining the DataSet1 variable? This may be a scope issue if
    you don't have a class level declaration and you're trying to access DataSet1
    from a method that doesn't have access to DataSet1.

    Also verify that your project has a reference set to System.Data which is
    the assembly that defines the DataSet type.


    "Richard Pidcock" wrote:

    > I'm trying to bind data from a table in a database to a dropdownlist. I can
    > successfully add the connection and data adapter but when I add the dataset I
    > get and error during build.
    >
    > The type or namespace name 'DataSet1' does not exist in the class or
    > namespace 'CiscoSpares.CiscoSpares' (are you missing an assembly reference?)
    >
    > Any help???
    >
    =?Utf-8?B?SlAuU2tsZW5rYQ==?=, Dec 17, 2004
    #2
    1. Advertising

  3. "Richard Pidcock" <> wrote in
    message news:...
    > I'm trying to bind data from a table in a database to a dropdownlist. I
    > can
    > successfully add the connection and data adapter but when I add the
    > dataset I
    > get and error during build.
    >
    > The type or namespace name 'DataSet1' does not exist in the class or
    > namespace 'CiscoSpares.CiscoSpares' (are you missing an assembly
    > reference?)
    >
    > Any help???


    If you used all the defaults, then the type of your strongly-typed dataset
    is "DataSet1". The name of the instance added to your page would be
    "DataSet11".

    Can you show the line on which you are receiving this error?

    John Saunders
    John Saunders, Dec 18, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SirPoonga
    Replies:
    2
    Views:
    730
    Ben Strackany
    Jan 7, 2005
  2. Vigneshwar Pilli via DotNetMonster.com

    Problem Binding Data to DROP DOWN LIST CONTROL

    Vigneshwar Pilli via DotNetMonster.com, Mar 9, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    615
    Karl Seguin
    Mar 10, 2005
  3. weiwei
    Replies:
    0
    Views:
    990
    weiwei
    Jan 5, 2007
  4. msimmons
    Replies:
    0
    Views:
    442
    msimmons
    Jul 16, 2009
  5. Replies:
    5
    Views:
    237
Loading...

Share This Page