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

Forum statistics

Threads
473,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top