Here's my label:
<asp:label id=Label1 style="Z-INDEX: 102; LEFT: 408px; POSITION: absolute; TOP: 264px" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ordernumber", "{0:c}") %>' Width="72px">
</asp:label>
-----------------------------------------------------------------
Here's my code behind:
Dim ds As New DataSet
ds = New DataSet("cbphotoalbumdb")
Dim connectionstring As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= C:\inetpub\wwwroot\cbphotoalbum2\_database\dotnet. mdb"
Dim connection1 As OleDbConnection = New _
OleDbConnection(connectionstring)
Dim command1 As OleDbCommand = _
New OleDbCommand("SELECT orders.ordernumber, shopper.lastname, shopper.firstname, orders.orderdate, orders.ordercomplete FROM shopper, orders WHERE ordernumber=200")
command1.CommandType = CommandType.Text
connection1.Open()
command1.Connection = connection1
Dim oledbdataadapter1 As OleDbDataAdapter = New OleDbDataAdapter
oledbdataadapter1.SelectCommand = command1
oledbdataadapter1.Fill(ds)
Label1.DataBind()
connection1.Close()
connection1.Dispose()
------------------------------------------------------------------
Here's my error message:
Compiler Error Message: BC30456: 'DataItem' is not a member of 'System.Web.UI.Control'.
-------------------------------------------------------------------
Thank You:)
|