How to calculate with databinder?

G

Guest

Hello
in a edittemplate of a datalist i want to use rangevalidators (for date e.g.), but these rangevalidators min and max values must be dependent on the value to edit (e.g. if the date to edit is 10/10/2003, the max-value should be 10/10/2003+3 months and min-value 10/10/2003-3 months.)

One possibility could be to add calculated columns to the datatable , but i don't know if this is a good idea when i want to use updates to the database

Does anybody can tell me how to calculate with the Databinder object
<%# DataBinder.Eval(Container.DataItem, "MyDate") %> - and now, please add/substract days, months

Thanks
Peter
 

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

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,135
Latest member
VeronaShap
Top