As for the designer error, simply switching:
a href="<%# ShowURL(DataBinder.Eval(Container.DataItem, "FORM_ID"))%>"
target="_blank">
to:
a href='<%# ShowURL(DataBinder.Eval(Container.DataItem, "FORM_ID"))%>'
target="_blank">
should solve that (replace the " around the <%# ... %> with ' )
As far as I'm concerned, the question is pretty trivial. The separation of
code and HTML is almost complete in your examples below. ShowURL and
DisplayState both represent functionality that resides outside the HTML, and
if it needs to be reused, it could easily be extracted to a seperate code
file. The only way to achieve even greater separation is to hook into the
OnItemDataBound event and write a considerable chunk of code. For any
complex binding, this will result in a lot of code generating HTML. I've
seen code that took this approach, and it's an absolute nightmare. You end
with huge amounts of html created in code (new Table(), new TableRow(),
table.Rows.Add(tr), new TableCell(), new Label(), label.Text = SomeDBValue;
cell.Controls.Add(label), row.Cells.Add(cell)....), which is far harder to
maintain and change than the examples below.
The code has pretty good abstraction
1 - it uses methods located in codebehind for any actual processing
2 - It uses DataBinder.Eval which abstracts away the business layer
implementation (is Container.DataItem a datarowview ora custom class? who
knows, and why should the presentation layer care?)
I think you'll find that the benefits of further separation aren't worth
the high price you'll end up paying
Karl

Signature
http://www.openmymind.net/
http://www.fuelindustries.com/
> Hello All:
>
[quoted text clipped - 45 lines]
>
> Thank you for your input.
Joe - 15 Feb 2006 15:29 GMT
Thank you Karl. This helped. As always, I appreciate your input.

Signature
Joe
> As for the designer error, simply switching:
> a href="<%# ShowURL(DataBinder.Eval(Container.DataItem, "FORM_ID"))%>"
[quoted text clipped - 80 lines]
> >
> > Thank you for your input.