Question "error label" to appear?

JohnShell

Member
Joined
Sep 6, 2009
Messages
9
Programming Experience
3-5
Hi,

Doing web site using ASP & VB.NET. Have dynamic Grids (gridView). For inserting new record into DB, first page has drop-down list, date pickers, and text boxes. User may submit that info or navigate to second page. The info from first page is collected and shown in labels on second page. The second page has check boxes and when checked the accompanying text boxes (two for each of 5 check boxes) becomes enabled. When check boxes checked the grid is dynamically populated with 4 columns and corresponding rows per check box - two of the four columns per row are for user numeric input.
One of the input items is Total Hours for the new project. On the second page are offices (the check boxes hold the names of those offfices) and they are allocated a portion of the total hours.
Each office has teams. When the office check box is checked the names of the offices with its respective teams are propagated into the grid. The user may input the alloted hours for each team.
I want to insure that the number of hours input for each of the office's teams does not exceed the number of total hours assigned to each office. I have already done this for the office's input. I also inserted a hidden label under the grid. When the hours input exceed the hours alloted the label becomes visible. I want to do the math to reveal the number of exceeded hours, display the offending inputs and show the user the error.
In other words. Office ABC has teams 1; 2; 3; 4; and, 5. The hours allocated to office ABC are 60. Team allotment is 12 hrs each. A user mistakenly allots 12 hrs for teams 1-4 and 22 hrs for team 5. I want the "error label" to appear and show that the hours alloted to office is 60 and the teams total is 70 - User, please correct the input error.
The Compare Validator is not how I want to do this. I want to set this up programatically.
Let me know if you need to see the existing code.

Thanks,
John
 
Last edited:

Latest posts

Back
Top