Wayne,
There may be a way to do what you are trying to do. To be honest I think I would tell you to loop through the datatable and change the values there. I get the impression you are a ASP developer moving to .Net. Try using the .Net Controls like a DataList you may find some use in that.
-Calvin Luttrell
ProjectThunder.com
> I am trying to modify the output of a repeater control based on values in
> the source database. If I simply want to display the contents of a specific
> field I use a syntax such as:
>
> <td><%# Container.DataItem("Author") %></td>
>
> This works fine but when I want to use a bound value in program logic I get
> "Expression Expected" and/or other errors. I am trying code similar to the
> following:
>
> <%
> If (<%#Container.DataItem("StartDate")%> > lastdate) then
> lastdate = <%#Container.DataItem("StartDate") %>
> Response.Write("<tr><td colspan='4'><h3>" & lastdate &
> "</h3></td></tr>")
> End If
> Dim strTemp As String
> strTemp = <%#Container.DataItem("StartDate")%>.ToString( "d" )
> Response.Write("<td>" & strTemp & "</td>")
> %>
>
> I've tried eliminating the <% and %> in the binding tag since it is already
> within a code block but that also fails.
|