Prote..." />

Creating a table and binding to repeater dynamically from two database tables?

You can use the Repeater. ItemDataBound event: asp:Repeater runat="server" ItemDataBound="locationRepeater_ItemDataBound" ID="locationRepeater"> Protected Sub locationRepeater_ItemDataBound(Sender As Object, e As RepeaterItemEventArgs) If (e.Item. ItemType = ListItemType.

Item) Or _ (e.Item. ItemType = ListItemType. AlternatingItem) Then 'EXAMPLE: Change this to get your id and do the database call.

If CType(e.Item. DataItem, Evaluation). Rating = "Good" Then CType(e.Item.

FindControl("RatingLabel"), Label). Text = _ "***Good***" End If End If End Sub.

You can use the Repeater. ItemDataBound event: Protected Sub locationRepeater_ItemDataBound(Sender As Object, e As RepeaterItemEventArgs) If (e.Item. ItemType = ListItemType.

Item) Or _ (e.Item. ItemType = ListItemType. AlternatingItem) Then 'EXAMPLE: Change this to get your id and do the database call.

If CType(e.Item. DataItem, Evaluation). Rating = "Good" Then CType(e.Item.

FindControl("RatingLabel"), Label). Text = _ "***Good***" End If End If End Sub.

That looks interesting. Am I right in assuming that e.Item. DataItem is the value from the repeater and that your code If CType ... end if is where my database call needs to go?

– Jamie Hartnoll Nov 1 at 13:33 Oh, also @rick, is this a terribly inefficient way to do it? The only thing that bothers me is that it's opening the database on every loop, it'll only be about 3/4 times, but still... – Jamie Hartnoll Nov 1 at 13:35 I'm getting an error Type 'System.Web.UI.WebControls. Repeater' does not have a public property named 'ItemDataBound'.Now... any ideas what I'm missing to get that to work?

– Jamie Hartnoll Nov 1 at 13:42 Got that sorted, it was a . NET 2.0 issue. All working, thanks!

:D – Jamie Hartnoll Nov 1 at 14:45.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions