Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Unclear on Datasources

Unclear on Datasources

Scheduled Pinned Locked Moved ASP.NET
databasecomhelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MeterMan
    wrote on last edited by
    #1

    I have this code in ExpenseReport.aspx.vb with the sql string and all. Do I still need to make a datasource with the designer? The reason I say Is i see no other way to get the datasource into the aspx file. http://pastebin.com/627396 (here is the vb file that i'm working with) http://pastebin.com/627405 (the one that the designer made) Personally Id like to make the datasource totally from scratch manually like i did in the vb file but the thing is when I remove the datasource from the aspx file my datagrid goes bye bye. Can someone please please help me in understandng what i'm doing wrong cause i'm going nuts over here. Win32newb "Programming is like Sex, make a mistake and you end up providing support for a long time"

    M 1 Reply Last reply
    0
    • M MeterMan

      I have this code in ExpenseReport.aspx.vb with the sql string and all. Do I still need to make a datasource with the designer? The reason I say Is i see no other way to get the datasource into the aspx file. http://pastebin.com/627396 (here is the vb file that i'm working with) http://pastebin.com/627405 (the one that the designer made) Personally Id like to make the datasource totally from scratch manually like i did in the vb file but the thing is when I remove the datasource from the aspx file my datagrid goes bye bye. Can someone please please help me in understandng what i'm doing wrong cause i'm going nuts over here. Win32newb "Programming is like Sex, make a mistake and you end up providing support for a long time"

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      Hi there, In the ASP.NET 2.0, there are two options that you can use to bind data to a data-bound control like the GridView ... + The old way which you are familiar with in the ASP.NET 1.x, you can bind a datasource to the DataSource property of the control, then call the DataBind method. When you use this way, you don't need to use a datasource control like AccessDataSource control in the web page and specify the DataSourceId property of the data-bound control. + Use a new handy datasource control and specify the DataSourceId of the data-bound control. The DataSource control helps you easily bind data to the control without even writing a line of code in the web page.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups