CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2009
    Posts
    596

    How do I load a reader?

    Hi everybody. How do I load a reader with my database connection being in the web.config file? I want to load a dropdownlist with the reader in the default.aspx page.

  2. #2
    Join Date
    Nov 2002
    Location
    .NET 3.5 VS2008
    Posts
    1,039

    Re: How do I load a reader?

    What do you mean by a 'reader'? Can you be more precise?

  3. #3
    Join Date
    Dec 2009
    Posts
    596

    Re: How do I load a reader?

    Excuse me. I meant datareader.

  4. #4
    Join Date
    Nov 2002
    Location
    .NET 3.5 VS2008
    Posts
    1,039

    Re: How do I load a reader?

    Ok. Basically you can use ASP.NET data source controls that minimise the amount of code you would write. The DropDownList is a data-bound control so you should be able to point it to the datasource that you go with. The type of datasource control is up to you. If you have a sql server database I would recommend a SqlDataSource. If you already have some kind of data access layer (sounds like you don't) then you would have more options.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured