calling function from gridview

T

tarscher

Hi all,

I have a label in a gridview that contains the duration of a run. I use
Text='<%# CalculateDuration(Convert.ToDateTime(Eval("StartTime")),
Convert.ToDateTime(Eval("EndTime"))) %>'>

The gridview also contains
<asp:BoundField DataField="StartTime" HeaderText="Start Time"
SortExpression="StartTime" />
<asp:BoundField DataField="EndTime" HeaderText="End Time"
SortExpression="EndTime" />

When I debug CalculateDuration(DateTime start, DateTime end) is see the
function is called but the datetime is always 01/01/0001 0:00:00. I
guess the time isn't passed correctly.

Someone knows why?

regards,
Stijn
 

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
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top