473,382 Members | 1,400 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,382 software developers and data experts.

asp repeater

I have an asp repeater control which I am trying to assign the
datasorce to it inline. Here is my code.

<asp:Repeater ID="AddOnList" DataSource="<%#
BasketLineDAO.GetByEventCategory(content.Id,10)%>" Runat=server>

This does not work. I do not get any rows from the repeater. but when
I assign the datasource and bind it in the behing code, I do get the
rows

Behind Code:
// AddOn basket
AddOnList.DataSource = BasketLineDAO.GetByEventCategory(content.Id,
10);
AddOnList.DataBind();

This is driving me nuts!

John
Nov 18 '05 #1
3 1884
When you assign the data source declaratively inline, do you still call
DataBind? You need to call it.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist


"John Giblin" <jw*******@hotmail.com> wrote in message
news:3d**************************@posting.google.c om...
I have an asp repeater control which I am trying to assign the
datasorce to it inline. Here is my code.

<asp:Repeater ID="AddOnList" DataSource="<%#
BasketLineDAO.GetByEventCategory(content.Id,10)%>" Runat=server>

This does not work. I do not get any rows from the repeater. but when
I assign the datasource and bind it in the behing code, I do get the
rows

Behind Code:
// AddOn basket
AddOnList.DataSource = BasketLineDAO.GetByEventCategory(content.Id,
10);
AddOnList.DataBind();

This is driving me nuts!

John

Nov 18 '05 #2
How do I do that?
"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:uc**************@TK2MSFTNGP10.phx.gbl...
When you assign the data source declaratively inline, do you still call
DataBind? You need to call it.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist


"John Giblin" <jw*******@hotmail.com> wrote in message
news:3d**************************@posting.google.c om...
I have an asp repeater control which I am trying to assign the
datasorce to it inline. Here is my code.

<asp:Repeater ID="AddOnList" DataSource="<%#
BasketLineDAO.GetByEventCategory(content.Id,10)%>" Runat=server>

This does not work. I do not get any rows from the repeater. but when
I assign the datasource and bind it in the behing code, I do get the
rows

Behind Code:
// AddOn basket
AddOnList.DataSource = BasketLineDAO.GetByEventCategory(content.Id,
10);
AddOnList.DataBind();

This is driving me nuts!

John


Nov 18 '05 #3
AddOnList.DataBind();

as you did when assigning the datasource programmatically. With exactly same
idea to get control to bind to the datasource.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

"John Giblin" <jg*****@roadrunner.com> wrote in message
news:bb*********************@twister.nyc.rr.com...
How do I do that?
"Teemu Keiski" <jo****@aspalliance.com> wrote in message
news:uc**************@TK2MSFTNGP10.phx.gbl...
When you assign the data source declaratively inline, do you still call
DataBind? You need to call it.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist


"John Giblin" <jw*******@hotmail.com> wrote in message
news:3d**************************@posting.google.c om...
I have an asp repeater control which I am trying to assign the
datasorce to it inline. Here is my code.

<asp:Repeater ID="AddOnList" DataSource="<%#
BasketLineDAO.GetByEventCategory(content.Id,10)%>" Runat=server>

This does not work. I do not get any rows from the repeater. but when
I assign the datasource and bind it in the behing code, I do get the
rows

Behind Code:
// AddOn basket
AddOnList.DataSource = BasketLineDAO.GetByEventCategory(content.Id,
10);
AddOnList.DataBind();

This is driving me nuts!

John



Nov 18 '05 #4

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

Similar topics

0
by: Ed Allan | last post by:
http://ejaconsulting.com/nestedrepeater/NestedRepeater.txt >-----Original Message----- >Doh! The HTML has all been rendered . . . > >Right click on this link and select 'Save target as ..' >to...
8
by: Invalidlastname | last post by:
Hi, We are developing an asp.net application, and we dynamically created certain literal controls to represent some read-only text for certain editable controls. However, recently we found an issue...
8
by: I am Sam | last post by:
Hi everyone, This problem is making me old. I don't want to get any older. I have a multi-nested repeater control as follows: <asp:Repeater ID="clubRep1" Runat="server">...
2
by: mark | last post by:
(not sure if this is the correct group) My problem is I need to have a "nested" repeater. I have an array which I load into a hashtable - that part works great. I can setup the second repeater...
2
by: GD | last post by:
I'd like to use a Repeater to display data coming back from a cross-tab report. Because it's a cross-tab, I generally don't know how many columns are coming back. They do follow a certain format: ...
8
by: fernandezr | last post by:
I would like to use a user control as a template inside a repeater. Some of the fields in the control should be hidden depending on whether or not there is data. I'm still a ASP .Net newbie so the...
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;...
0
by: uncensored | last post by:
Hello everyone, I'm fairly new at .Net and I have a repeater inside a repeater problem. I will attach my code to this message but basically what I am able to tell when I run my page it tells me...
7
by: | last post by:
I have what's probably a simple page lifecycle question related to dynamically evaluating values that are placed by a repeater and dynmically placing user controls that use those values. I'm...
3
by: Emma Middlebrook | last post by:
Hi there, I've been trying to implement a repeater control in an ASP.NET 2 page but I can't seem to get the layout exactly how I want and I'm not sure if it's something that I am doing wrong or...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.