473,385 Members | 1,983 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Tricky stuff with a dropdown

I have an ASP app that I've recreated in ASP.NET and have
a problem recreating one part of it.

The original includes a dropdown (an html select object with name='Origin')
that I populate using javascript when I change a second dropdown. Each time
I change the selection in the second dropdown, it repopulates the other.

When the form posts, I'm in another page and I can get the value using:
Request("Origin")

In ASP.NET, I've recreated the javascript functionality that repopulates
the dropdown (it's now a dropdownlist web control). I hit a button to run
a report but I can't figure out how to capture the text. It's not in
selecteditem.text.

Perhaps I can still use Request, but I'm not sure when.

Note that if I viewsource for the page that the populated values do not
show,
either in ASP or ASP.NET
Nov 18 '05 #1
1 1012
Jim,
If you are adding new items to the select box on the client side using javascript as you described, then ASP.NET will not see those values when you submit the form. You have to use the Request object to get the value in these situations.

Tu-Thach

----- Jim Corey wrote: -----

I have an ASP app that I've recreated in ASP.NET and have
a problem recreating one part of it.

The original includes a dropdown (an html select object with name='Origin')
that I populate using javascript when I change a second dropdown. Each time
I change the selection in the second dropdown, it repopulates the other.

When the form posts, I'm in another page and I can get the value using:
Request("Origin")

In ASP.NET, I've recreated the javascript functionality that repopulates
the dropdown (it's now a dropdownlist web control). I hit a button to run
a report but I can't figure out how to capture the text. It's not in
selecteditem.text.

Perhaps I can still use Request, but I'm not sure when.

Note that if I viewsource for the page that the populated values do not
show,
either in ASP or ASP.NET

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Felipe Gasper | last post by:
I'm trying to make some "sub-cells" in an HTML table and to control their positioning and content presentation via CSS. In the table at the following URL: ...
25
by: PyPK | last post by:
What possible tricky areas/questions could be asked in Python based Technical Interviews?
5
by: Almir | last post by:
This db i created has been driving me nuts. I have this one table LOCATIONS, and in the data entry forms, the user is suppose to change the locations of the equipment or set a location when first...
13
by: melih.onvural | last post by:
Group, I'm having a tough time understanding some of the previous posts on this topic so I wanted to write what I've tried and hope that you can help me troubleshoot. I have a dropdown populated...
3
by: Chris Capel | last post by:
I want to do something along the lines of this: class someclass { static void Main() { int i = 5; int j = 3; changevalue(ref i, j); Console.WriteLine(i.ToString()); //I want this to output 3...
5
by: Sebastian | last post by:
Here's the thing I have a web aplication (1.1) and one of my classes has an array as a property (let's say Class A, has an ArrayList of Bs). On the other side I have a win form app which uses web...
5
by: Gil | last post by:
Is there a way to tell if a combbox is in dropdown mode. I tried and if statement combobox.dropdown = true but i get an error. dropwndown function doesnt store if its true or false what i am...
3
by: devNorway | last post by:
I have been struggling with a problem for days now, and searched for related problems and solutions but had no luck. I have two dropdown listboxes where the first is populated in page load and...
7
by: Osiris | last post by:
Just something I would like to share: I just learned the hard way (2 days detective work on a bug) that foreach loops are not at all like for loops, not intuitive at all. BEWARE: arrays and...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.