Dear Xtremers,
I have 4 dropdownlist controls which let users to select the task Starttime and endtime:
There is a datagrid which have 2 controls in each of the editItemtemplate. They are (in editItemTemplate A StartTimeHrDDL, StartTimeMinDDL & (in editItemTemplate B EndTimeHrDDL, EndTimeMinDDL. And because these controls are created in runtime. I place the validator control in the end of editItemTemplate B too.
I found no problem when compare EndTimeHrDDL with StartTimeHrDDL (I want to make sure EndTime should not be lesser then StartTime). However, I want to perform the same validation to the StartTimeMinDDL & EndTimeMinDDL ONLY if StartTimeHrDDL = EndTimeHrDDL.
Because I cannot write a if..else statement in the runtime (if it is possible, please teach me!), I try to call a function like <%# GetResult() %> to get the result of the validation between StartTimeHrDDL & EndTimeHrDDL but fail.
Could anyone give me some idea? Thanks
I have 4 dropdownlist controls which let users to select the task Starttime and endtime:
There is a datagrid which have 2 controls in each of the editItemtemplate. They are (in editItemTemplate A StartTimeHrDDL, StartTimeMinDDL & (in editItemTemplate B EndTimeHrDDL, EndTimeMinDDL. And because these controls are created in runtime. I place the validator control in the end of editItemTemplate B too.
I found no problem when compare EndTimeHrDDL with StartTimeHrDDL (I want to make sure EndTime should not be lesser then StartTime). However, I want to perform the same validation to the StartTimeMinDDL & EndTimeMinDDL ONLY if StartTimeHrDDL = EndTimeHrDDL.
Because I cannot write a if..else statement in the runtime (if it is possible, please teach me!), I try to call a function like <%# GetResult() %> to get the result of the validation between StartTimeHrDDL & EndTimeHrDDL but fail.
Could anyone give me some idea? Thanks