Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2006

Tip: Looking for answers? Try searching our database.

Binding a DataSet to a web server repeater control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jon S - 15 Feb 2006 10:43 GMT
Hi all

In short, I have a dataset that contains 10 records and the relevant headings.
All I want to do is bind this dataset to a asp.net repeater control.  All the
examples I've seen create table cell headings and then map to them headings
like:

<%#DataBinder.Eval(Container.DataItem, "CompanyName")%>,
<%#DataBinder.Eval(Container.DataItem, "ContactName")%></font>

I dont need to , and therefore haven't, created any headings as the dataset
has them already.  I just want to do something like this:
CODE BEHIND CODE:
this.repwscDayTop10.DataSource = dsDayTop10;
this.repwscDayTop10.DataBind();

WEB FORM CODE:
<asp:Repeater id="repwscDayTop10" runat="server">
<%#Container.DataItem%>
</asp:Repeater>

How do I do this?  Is there any good links?    Thanks in advance.
Karl Seguin [MVP] - 15 Feb 2006 12:26 GMT
can you show us exactly what your dataset looks like? Are the "headings"
just another row in the dataset (the first? the last?) or are they the
actual column names? If it's the actual column names, just try using a
datagrid with no templates or anything:

<asp:datagrid id="x" runat="server" AutoGenerateColumns="true"/>

Karl

Signature

http://www.openmymind.net/

> Hi all
>
[quoted text clipped - 22 lines]
>
> How do I do this?  Is there any good links?    Thanks in advance.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.