473,405 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Binding a DataSet to a web server repeater control

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.

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200602/1
Feb 15 '06 #1
1 1676
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

--
http://www.openmymind.net/

"Jon S via DotNetMonster.com" <u2272@uwe> wrote in message
news:5be96dcf07dd1@uwe...
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.

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200602/1

Feb 15 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jim French | last post by:
I have a page that takes a comma delimited string and needs to bind to a Repeater control. The string is split into an Array, and each value is put into a DataBase query via a For Each loop. The...
2
by: Stephen Miller | last post by:
I am using the OnItemDataBound event of Repeater control to nest a DataGrid within the Repeater. When I attempt to bind to the DataGrid using the DataSource method I get the error message "Object...
3
by: francois | last post by:
Hi, I have a little problem I am using a stored procedure to retrieve my date. What I want to achieve is to be able to "skip" some row from the resultset i retrieve back from the stored...
0
by: T-Bone | last post by:
Problem with page_load firing twice was driving me mad. I had an aspx page with several webusercontrols in it. One of them had a repeater with some databinders in it. In my codebehing I bind a...
2
by: Gastin | last post by:
I am consuming a web serivce from Amazon.Com. I have the following class which was autogenerated by VS.NET when I created a Web Reference to...
9
by: Jaybuffet | last post by:
my aspx has something like this <asp:Repeater id="Repeater1" runat="server"> <ItemTemplate> <mycontrol:ctl id="ctlId" obj='<%# Container.DataItem %>' showItem="true"/> </ItemTemplate>...
3
by: Alex Maghen | last post by:
I'm having trouble with my repeater: I'm binding my Repeater control to an OleDbDataReader object. My ASPX looks like this: <asp:Repeater ID="Rptr" runat="server"> <ItemTemplate> <asp:Label...
4
by: Brad Baker | last post by:
I'm going a little crazy :) I'm trying to bind a repeater control to a dataset on page load using the following code: if (Request.QueryString != null) { string customerid = Request.QueryString;...
12
by: =?Utf-8?B?Qi4gQ2hlcm5pY2s=?= | last post by:
I'm doing a web app in VB/Dot Net 2.0. I'm probably a bit rusty and I have no experience using the repeater control. I have a user control I've created with multiple properties. I've created a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.