Opinion

B

bspann

I need some opinions.

Here is the situation: I have a DataGrid with TemplateColumns. To display
my values, I use the ASP code in the HTML. So for example, I have <%#
DataBinder.Eval(Container.DataItem, "myData", "{0:C}") %>

Question:
Is this the perferred way of displaying my data? When I do this, I can no
longer use the desing tab in VS.NET.

Need your Opinion!
 
A

Adam

You only lose the designer functionality if you use the
statement inside of a property, for instance:

<asp:label text='DataBinder.Eval
(Container.DataItem, "myData", "{0:C}") %>' />

However, if you don't need to use it as a property and are
just displaying text you could do something like this:

<span>DataBinder.Eval
(Container.DataItem, "myData", "{0:C}") %></span>

With this solution you won't lose the designer
functionality.
 

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,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top