Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: 'DataSource' is not a member of 'System.Web.UI.WebControls.Label'


Message #1 by "Allen Gerner" <agerner@a...> on Mon, 13 Jan 2003 23:16:57 -0500
This is in reference to page 79.  It does not like the line:

 

Line 18:   objCommand = New OleDbDataAdapter(strCommand,objConnection)
Line 19:   objCommand.Fill(DataSet1,"employee")
Line 20:   DataGrid1.DataSource=DataSet1.Tables("employee").DefaultView
Line 21:   DataGrid1.DataBind()

Line 22: End Sub

 

The line in question is line 20.  It is complaining that DataSource is
not a member of DataGrid.  Anyone's help would be appreciated.  

 

Allen Scott Gerner

agerner@a...

(732) 531 - 3036

 

"GREAT MINDS DISCUSS IDEAS,
AVERAGE MINDS DISCUSS EVENTS,
SMALL MINDS DISCUSS PEOPLE."
                                      - Eleanor Roosevelt

 


Message #2 by "Allen Scott Gerner" <agerner@a...> on Tue, 14 Jan 2003 05:05:42
Never mind.  Found the problem.  In the line <asp:>  after the colon I 
used label instead of DataGrid.  It is no wonder that it could not find a 
member function of the data grid class inside the label class.  I leaped 
before I looked.  It works now.

 - Allen

  Return to Index