Unclear on Datasources
-
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"
-
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"
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 theDataBind
method. When you use this way, you don't need to use a datasource control like AccessDataSource control in the web page and specify theDataSourceId
property of the data-bound control. + Use a new handy datasource control and specify theDataSourceId
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.