Form: extract VALUE and DISPLAY value?

Form: extract VALUE and DISPLAY value?

am 15.10.2004 21:29:55 von jason

What is the best way to extract incoming ID form variables and their
corresponding text values.

Is there an easy way to extract both the initialized value on the form and
its DISPLAY value.

For instance my form element may look this:

>Florida

But, when I process the form I require both the StateID and the Display
value:

StateID=1
State=Florida

Is there a way to do this without looping through the form...I already have
an existing asp processing page for about 30 form fields and hope I don't
have
to revise the page logic too much?

Thanks
Jason

Re: extract VALUE and DISPLAY value?

am 15.10.2004 21:50:01 von unknown

The text, "Florida" is not part of a form element. It is just text within
the page, and it will not be sent to the server when the form is submitted.
You could put that value in a hidden input, if you like. In order for any
data to be submitted to the server on form submission, the data must exist
in an input element, i.e.
or
or

So, you could do:
Florida


Ray at work

wrote in message
news:uwUMb1usEHA.2768@TK2MSFTNGP14.phx.gbl...
> What is the best way to extract incoming ID form variables and their
> corresponding text values.
>
> Is there an easy way to extract both the initialized value on the form and
> its DISPLAY value.
>
> For instance my form element may look this:
>
> >Florida
>
> But, when I process the form I require both the StateID and the Display
> value:
>
> StateID=1
> State=Florida
>
> Is there a way to do this without looping through the form...I already
> have
> an existing asp processing page for about 30 form fields and hope I don't
> have
> to revise the page logic too much?
>
> Thanks
> Jason
>
>

Re: extract VALUE and DISPLAY value?

am 15.10.2004 23:37:22 von jason

Ok, but supposing these values were coming out of a database would it be
considered wasteful to implement that 'extra' hidden field for the display
value.

I have seen other concantenate values using eg: '_'
345_Florida
...and they then use string manipulation to seperate them
on the processing page but I find this messy....

Your thoughts?

Thanks
Jason
"Ray Costanzo [MVP]" wrote in
message news:%23Wr2KAvsEHA.160@TK2MSFTNGP11.phx.gbl...
> The text, "Florida" is not part of a form element. It is just text within
> the page, and it will not be sent to the server when the form is
submitted.
> You could put that value in a hidden input, if you like. In order for any
> data to be submitted to the server on form submission, the data must exist
> in an input element, i.e.
> or
> or
>
> So, you could do:
> Florida
>
>
> Ray at work
>
> wrote in message
> news:uwUMb1usEHA.2768@TK2MSFTNGP14.phx.gbl...
> > What is the best way to extract incoming ID form variables and their
> > corresponding text values.
> >
> > Is there an easy way to extract both the initialized value on the form
and
> > its DISPLAY value.
> >
> > For instance my form element may look this:
> >
> > >Florida
> >
> > But, when I process the form I require both the StateID and the Display
> > value:
> >
> > StateID=1
> > State=Florida
> >
> > Is there a way to do this without looping through the form...I already
> > have
> > an existing asp processing page for about 30 form fields and hope I
don't
> > have
> > to revise the page logic too much?
> >
> > Thanks
> > Jason
> >
> >
>
>

Re: extract VALUE and DISPLAY value?

am 17.10.2004 20:18:45 von unknown

In that case, I'd probably either do a value="345,Florida" or just do
value="345" since the database already knows that 345 corresponds to
Florida. It would depend more on what I needed to do with that "Florida"
data and what it is that makes it necessary to have it submitted.

Ray at home

wrote in message
news:O0NDq8vsEHA.3200@TK2MSFTNGP09.phx.gbl...
> Ok, but supposing these values were coming out of a database would it be
> considered wasteful to implement that 'extra' hidden field for the display
> value.
>
> I have seen other concantenate values using eg: '_'
> 345_Florida
> ..and they then use string manipulation to seperate them
> on the processing page but I find this messy....
>
> Your thoughts?
>
> Thanks

Re: extract VALUE and DISPLAY value?

am 27.10.2004 00:09:28 von jason

Thanks...makes sense.

- Jason
"Ray Costanzo [MVP]" wrote in
message news:ecdHhWHtEHA.3564@tk2msftngp13.phx.gbl...
> In that case, I'd probably either do a value="345,Florida" or just do
> value="345" since the database already knows that 345 corresponds to
> Florida. It would depend more on what I needed to do with that "Florida"
> data and what it is that makes it necessary to have it submitted.
>
> Ray at home
>
> wrote in message
> news:O0NDq8vsEHA.3200@TK2MSFTNGP09.phx.gbl...
> > Ok, but supposing these values were coming out of a database would it be
> > considered wasteful to implement that 'extra' hidden field for the
display
> > value.
> >
> > I have seen other concantenate values using eg: '_'
> > 345_Florida
> > ..and they then use string manipulation to seperate them
> > on the processing page but I find this messy....
> >
> > Your thoughts?
> >
> > Thanks
>
>