Checking for errors |
6/5/2007 8:51:53 AM |
ASPRunnerPro General questions | |
M
MikeGinMN author
Is it possible to check the info entered into an add and/or edit page to make sure things are correct? Example I have 5 boxes for events (3 individual and 2 team) a person can be in up to 4 (3 individual 1 team or 2 individual and 2 team) so I would like to make sure they don't try to add the fifth one. I'm sure I just have to check the avalue of each to see that it is empty - but am not sure how to display a message and/or keep it on the page. |
|
![]() |
Sergey Kornilov admin 6/5/2007 |
Use BeforeEdit event to validate entered values. |
M
|
MikeGinMN author 6/5/2007 |
Thats what I thought - so I must be doing something wrong in before event I have this |
F
|
funklet 6/5/2007 |
Mike, |
M
|
MikeGinMN author 6/5/2007 |
I copied the first part of your programming into the before add event - but it still adds the event. The terms Event01, Event02 and etc are the names of the fields within the table they go into - does that make a difference? |
![]() |
Sergey Kornilov admin 6/5/2007 |
What is the data type of Event01, Event02, ... fields? |
M
|
MikeGinMN author 6/6/2007 |
I appreciate all the help - but am not getting the results |
![]() |
Sergey Kornilov admin 6/6/2007 |
Mike, Response.write "Event01: " & dict("Event01") & ":" & IsNull(dict("Event01")) & "<br>"
|
M
|
MikeGinMN author 6/6/2007 |
I think I'm getting there - one other question regarding error checking - is it possible to have the message appear like a popup so that it doesn't interfer with the original pages layout? |
![]() |
Sergey Kornilov admin 6/7/2007 |
Try this: |
M
|
MikeGinMN author 6/11/2007 |
Thank You for all the help - The only way I got it to come back with a correct response (it came back in "IsNull" as false even when nothing was in it and also gave a false if I used "") was to check the length of each field to see if it was equal to zero, if all five came back as greater than zero it work. I appreciate all the help - I greatly appreciate your product and the support you supply |