Can't display container Items (ASP.NET - VB)

I have a repeater control on my webpage called Repeater1.  I am going to use it to repeat information in my containers, but I can not even get them to display data.The way I am using the container is like this:  <%#Container.DataItem("first_name")%>  

THe problem is, when I input ANY container into the page, the following error comes up:

Compiler Error Message: BC30456: 'DataItem' is not a member of 'System.Web.UI.Control'.

As you can see, I have imported the namespace but still no luck.

The funny thing is, I copied this exact code from a page that was working and it won't work on this new page...  The code has worked previously - am I just missing something here??

My Code:
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
<%@ Import Namespace="" %>
<%@ Import Namespace="" %>

<script runat="server">

Sub Page_Load(Obj As Object, E As EventArgs)

            'Set up connection
            'Dim myConnection As String = ConfigurationSettings.AppSettings.Item("myConnection")
            Dim ConnectionString As String = "server=(local);Initial Catalog=my_db;User ID=sa;Password=mypass;"
            Dim CommandText as String = "SELECT Lead_ID, first_name, last_name, Address1, City, ""State"", Zip, Date_Aquired, Last_Contact FROM dbo.tbl_residential_leads"
            'Open Connection
            Dim myConnection As New SqlConnection(ConnectionString)
            Dim myCommand as New SqlDataAdapter(CommandText, MyConnection)
            'Fill Dataset
            Dim ds as New DataSet()
            myCommand.Fill(ds, "tbl_residential_leads")
            'Select data view and bind to server control


Please help before I throw my computer out of the window...

            Repeater1.DataSource = ds.Tables("tbl_residential_leads").DefaultView
End Sub
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

We will have to see your repeater control code - in particular, where you are placing the <%#Container.DataItem("first_name")%> piece. I am not too familiar with repeaters but with datagrids - I think they work similarly, so maybe I will be able to help.
brooksreeseAuthor Commented:
I have tried this with and without the <form runat="server"> tags but nothing seems to work.  Does this give you any idea to the problem?

Oh, I have tried this without the repeater as well, no luck either way.

                                                              <form runat="Server">
                                          <ASP:Repeater runat="server" id="Repeater1">
                                              <tr bgcolor="#E0E0E0" class="Basic_info_text">
                                                  <td width="100"><%# DateTime.Parse(ds.FieldValue("Date_Aquired", Container)).ToString("d") %></td>
                                                  <td width="110"><%# ds.FieldValue("first_name", Container) %><%# ds.FieldValue("last_name", Container) %></td>
                                                  <td width="150" bgcolor="#E0E0E0"><%# ds.FieldValue("Address1", Container) %></td>
                                                  <td width="110"><%# ds.FieldValue("City", Container) %><%# ds.FieldValue("State", Container) %>.</td>
                                                  <td width="100">814-777-8818</td>
                                                  <td width="100"><%# DateTime.Parse(ds.FieldValue("Last_Contact", Container)).ToString("d") %></td>
                                                  <td width="0"><div align="right"><span style="color: #0066FF"><span style="color: #0066FF"><a href="/_intranet/offices/residential/leads/viewDetails.aspx">Details</a></span></span></div></td>
                                                  <td bgcolor="#E0E0E0" class="Basic_info_text"><div align="center"><a href="/_intranet/offices/residential/leads/editLead.aspx">Edit</a> </div></td>
I am not sure whether I can help you - it is getting late and tomorrow starts the family weekend... Anyway, I have never used your syntax of binding the data as in your last post. I have used
<%# DataBinder.Eval(container.dataitem, "price", "{0:c}")%> (great for formatting) and
<%# container.dataitem("ticket_name")%> (the way from your initial post)
Since you had bound the data to the repeater, you should not need to reference the dataset in your repeater control code, I would think.

Good luck! (and Happy Thanksgiving!)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
brooksreeseAuthor Commented:
Well, I don't know what to tell you.  I worked on this one problem for about four hours last night and I could not find one error.  Usually I do something dumb like leaving off an %> at the end of some code - but that is obvious.  The server immediately tells you small problems like that, and how to correct them.  This time was different.  I don't know exactly what it was, but you fixed it.  I deleted all of my container place holders and pasted in your <%# container.dataitem("ticket_name")%> (replacing ticket_name where needed, of course) code...  Some how it worked.  Maybe a combination of a good night's sleep and yoru help got this problem solved.

Thank you so much, I can continue with this project now. :)

have a GREAT thanksgiving!!!

Thanks for the points! I agree with you, however, that it really would be nice what fixed it, but some things are not meant to be known... Cheers!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.