Hi,
My first post here. I am a self-taught, very "green" web developer. It
is not the main focus of my job but required from time to time.
I am developing a web application that logs security incidents for my
company. Here is a little background on how it works. I am using ASP
..net and VB. The user first submits a new incident which has several
required and not required fields related to the incident. The new
incident is written to a SQL table. The primary key number is then
cached and the user is taken to a place where he/she can submit
people, properties, or attachments to go with this incident. These are
not required. (i have a feeling maybe this is bad design). So I have
one form with four submit buttons. One for incident, person, property,
and attachment. My problem is this:
When I use asp .net built in data validation it appears to validate
all the fields that come before the submit button I am using. So when
I submit an incident it doesn't flag me for say, a person's name being
blank because this is later in the form. If a user does not want to
enter a person, but wants to enter a property, he/she gets an error
that he did not put a name in for the person. I don't want this to
happen. The name is only required if a person is submitted.
I would like to know if there is a way to do this with the built in
validation on the same form? One of my requirements was to do this all
on one page, and the incident has to be submitted before I can add
people, properties, and attachments to it.
Whew....hope that makes sense. Thanks in advance.