Datalist and Variables in HTML

J

Jerry Camel

The DBA team at the office controls the naming conventions for the database
structure, but their naming convention are rather tedious. So typically I
create a global module that I use as a mapping file to create constants with
more appropriate field and table names and map them to the table and field
names required by the DB team. But now, using a DataList, I'm having a
problem. How can I use a variable name to indicate the field name in the
HTML that's rendered by the DataList control?

Rather than

<%# DataBiner.Eval(Container.DataItem, "T003_EntityName_String") %>

I want to use

<%# DataBiner.Eval(Container.DataItem, EName) %>

Where EName is a global var defined in a separate module.

Is there a way to do this? I'm getting complaints that EName isn't a valid
column name...

Thanks.

Jerry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,129
Latest member
FastBurnketo
Top