473,387 Members | 1,693 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,387 software developers and data experts.

asp:DropDownList and Javascript

First - my MSDN Posting Alias isn't defined yet because the MSDN site is
having problems, it came back with " We were unable to communicate with the
Managed Newsgroups registration system".

I have an ASP.NET website using C#. One page has two asp:DropDownList
controls, one that controls the other. Think a car website (first select
make, then model). I am using Javascript to populate the second list as the
first one changes. The problem is that when I query these controls after
the Submit button is pressed, it always returns back the first value of the
original list contents of the second control. It seems to be ignoring what
the Javascript did during runtime. So if the original list had "1", "2" and
"3" in the list, and then the user changes list 1 to another option, which
updates list 2 to have "4", "5" and "6" in the list. If the user clicks
submit and the code queries the value of list 2, it will return "1".
Mar 20 '08 #1
0 1894

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

Similar topics

1
by: Marius | last post by:
Hi all, I need an asp:dropdownlist on a webform that is databound to a dataset. This works fine and returns the data to populate my dropdownlist. In the DB I only have valid data, but I need a...
1
by: Thierry | last post by:
Hi, Is it possible to get the value of an asp:dropdownlist in javascript. I need to get that value to assign it to a hyperlink. This does not work:...
1
by: Urmal Patel via .NET 247 | last post by:
I have problem with asp:Dropdownlist. I have a dropdownlist control in Page1.aspx and I want to assign value and Text to dropdown list form Page2.aspx from java script function. I am able to assign...
7
by: Lastie | last post by:
Hi all, I’ve got a ‘dropdownlist’ web control and I can add ‘listitem’ no problem. I can also bind data from an SQL database fine. My problem is that I want to do both at the same...
1
by: Xuanly ly via .NET 247 | last post by:
asp:dropdownlist always display infront of everything and I can't make it display behind HELP HELP help!!!. <form id="Form1" method="post" runat="server"> <asp:TextBox id="TextBox1"...
1
by: Miguel Dias Moura | last post by:
Hello, I have two questions concerning Asp:DropDownList 1. How to fill a DropDownList from runtime and set its default item? 2. How do use a DropDownList in each datagrid record? All...
2
by: John Smith | last post by:
I have this DataGrid: <asp:datagrid id="dg1" runat="server" AutoGenerateColumns="False"> <Columns> <asp:TemplateColumn HeaderText="SM"> <ItemTemplate> <asp:Label id="Label2" runat="server"...
3
by: =?Utf-8?B?T2xkQnV0U3RpbGxMZWFybmluZw==?= | last post by:
If I want to hang javascript off of an asp:DropDownList control, how would I do this? There does not seem to be a "onchange" event so do I have to use an HTML control to do this?
6
by: uicouic | last post by:
Hi all. I need help about this particular aspect. In a webform I have an <asp:textbox> (txtName) and <asp:DropDownList> (lstSchool) with 2 values inside. I have typed in a value for the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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: 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...
0
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,...
0
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...

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.