473,791 Members | 3,193 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.te xt.

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 1025
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.te xt.

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
6181
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: https://fshn3152.foods.uiuc.edu/~fgasper/erf.html what I'm immediately trying to do is vertically position the text and checkboxes in all four "Statement Date" sub-cells (created with <span> elements).
25
3412
by: PyPK | last post by:
What possible tricky areas/questions could be asked in Python based Technical Interviews?
5
6867
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 entered. I set the property not to expand and limit to list, yet they somehow edit the data there anyways. I want to prevent that. I want them to be able to choose the options in combo box (with data from table locations) but not edit the...
13
2872
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 from a table and I want to take that selection and use it to populate the next dropdown. So far: 1) I tried using a query that said select specificissue from specific_issue and used as my criterion !!
3
3232
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 } //it's important that this parameter is an object, and not an int or
5
1447
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 services from the first app. The thing is that when I create an instance of A in my win form app, I can't add bs to de arraylist. I can't even see the ArrayList. I also tryied with DataTables with no luck, should I try a DataSet. What am I...
5
10296
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 trying to do is make an autoscroll combobox. like you have on html textbox's, but this time you hit enter for a change to be made. i do this because i dont want to requery every time a single letter is inputed. it would be too slow. so i make them hit...
3
4429
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 the second is populated based on the input in the first. The first dropdown is inside a "If Not Page.IsPostBackThey" if loop. Both have autopostback set to true. The problem is that when the user makes a choice in the first dropdown an event is...
7
2278
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 matrices are sparse by design/definition in PHP. I'm doing some matrix manipulation in a Finite Element program. Translating Fortran to PHP, because hosters won't allow anything else than PHP. I wish PHP would do array and matrix stuff like Fortran...
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9517
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10428
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10156
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9030
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4110
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.