Connecting Tech Pros Worldwide Forums | Help | Site Map

Form Submit, Dynamic Dropdown

Jeff Uchtman
Guest
 
Posts: n/a
#1: Nov 22 '05
I know I have done this but my mind is fried. I have a dynamic dropdown in
a form. I need to pull both the dynamic dropdown's ID and name listed in
the dropdown. Need a little help with grey matter tonight.

Thank
Jeff



Bob Barrows [MVP]
Guest
 
Posts: n/a
#2: Nov 22 '05

re: Form Submit, Dynamic Dropdown


Jeff Uchtman wrote:[color=blue]
> I know I have done this but my mind is fried. I have a dynamic
> dropdown in a form. I need to pull both the dynamic dropdown's ID
> and name listed in the dropdown. Need a little help with grey matter
> tonight.[/color]

In server-side code? The only thing passed from your html during a
submission to the server-side code is the name-value pairs found in either
the Form or Querystring collections. You can't even tell the type of
controls that were the source of the name-value pairs.

Unless you store the ID's in a hidden field*, perhaps using xml, there is no
way to determine the ID's in server-side code.

Bob Barrows
* or make the ID's the same as the names - not recommended
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


paul@bullschmidt.com
Guest
 
Posts: n/a
#3: Nov 22 '05

re: Form Submit, Dynamic Dropdown


Perhaps store both the ID and the name in the value part such as
"345|Smith Company"

Best regards,
J. Paul Schmidt, Freelance Web and Database Developer
http://www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
[color=blue]
> I know I have done this but my mind is fried. I have a dynamic
> dropdown in a form. I need to pull both the dynamic dropdown's ID
> and name listed in the dropdown. Need a little help with grey matter
> tonight.[/color]

paul@bullschmidt.com
Guest
 
Posts: n/a
#4: Nov 22 '05

re: Form Submit, Dynamic Dropdown


The ususal thing I do is just to get the ID and then look up the name
(from the database) on the later Web page that needs that info.

Best regards,
J. Paul Schmidt, Freelance Web and Database Developer
http://www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
[color=blue]
> I know I have done this but my mind is fried. I have a dynamic
> dropdown in a form. I need to pull both the dynamic dropdown's ID
> and name listed in the dropdown. Need a little help with grey matter
> tonight.[/color]

Jeff Uchtman
Guest
 
Posts: n/a
#5: Nov 22 '05

re: Form Submit, Dynamic Dropdown


That was it. Pass both values and split on database entry. That worked
great.
Thanks
Jeff

<paul@bullschmidt.com> wrote in message
news:1131975009.508845.185860@g47g2000cwa.googlegr oups.com...
Perhaps store both the ID and the name in the value part such as
"345|Smith Company"

Best regards,
J. Paul Schmidt, Freelance Web and Database Developer
http://www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
[color=blue]
> I know I have done this but my mind is fried. I have a dynamic
> dropdown in a form. I need to pull both the dynamic dropdown's ID
> and name listed in the dropdown. Need a little help with grey matter
> tonight.[/color]


Bob Barrows [MVP]
Guest
 
Posts: n/a
#6: Nov 22 '05

re: Form Submit, Dynamic Dropdown


Oh! I was thinking he wanted to get the SELECT element's id attribute ...

paul@bullschmidt.com wrote:[color=blue]
> Perhaps store both the ID and the name in the value part such as
> "345|Smith Company"
>
> Best regards,
> J. Paul Schmidt, Freelance Web and Database Developer
> http://www.Bullschmidt.com
> Access Database Sample, Web Database Sample, ASP Design Tips
>[color=green]
>> I know I have done this but my mind is fried. I have a dynamic
>> dropdown in a form. I need to pull both the dynamic dropdown's ID
>> and name listed in the dropdown. Need a little help with grey matter
>> tonight.[/color][/color]

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


Bob Barrows [MVP]
Guest
 
Posts: n/a
#7: Nov 22 '05

re: Form Submit, Dynamic Dropdown


Exactly. I can't think of a situation where I would need to pass both values
in the form submission (which is why I thought he was talking about the
SELECT element's id ... )

paul@bullschmidt.com wrote:[color=blue]
> The ususal thing I do is just to get the ID and then look up the name
> (from the database) on the later Web page that needs that info.
>
> Best regards,
> J. Paul Schmidt, Freelance Web and Database Developer
> http://www.Bullschmidt.com
> Access Database Sample, Web Database Sample, ASP Design Tips
>[color=green]
>> I know I have done this but my mind is fried. I have a dynamic
>> dropdown in a form. I need to pull both the dynamic dropdown's ID
>> and name listed in the dropdown. Need a little help with grey matter
>> tonight.[/color][/color]

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


Jeff Uchtman
Guest
 
Posts: n/a
#8: Nov 22 '05

re: Form Submit, Dynamic Dropdown


Its a dynamic dropdown from another table. I need to pass two elements from
that table to the submint form. SPLIT worked great!

Jeff


"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:eMR0WPT6FHA.3276@TK2MSFTNGP10.phx.gbl...[color=blue]
> Exactly. I can't think of a situation where I would need to pass both
> values
> in the form submission (which is why I thought he was talking about the
> SELECT element's id ... )
>
> paul@bullschmidt.com wrote:[color=green]
>> The ususal thing I do is just to get the ID and then look up the name
>> (from the database) on the later Web page that needs that info.
>>
>> Best regards,
>> J. Paul Schmidt, Freelance Web and Database Developer
>> http://www.Bullschmidt.com
>> Access Database Sample, Web Database Sample, ASP Design Tips
>>[color=darkred]
>>> I know I have done this but my mind is fried. I have a dynamic
>>> dropdown in a form. I need to pull both the dynamic dropdown's ID
>>> and name listed in the dropdown. Need a little help with grey matter
>>> tonight.[/color][/color]
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>[/color]


Closed Thread