Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    vbnet


Change Drop Down List Value In ASP.NET (VB)

how to change 2nd drop down list value after I selected the 1st drop down list value.

The best example is country and state. After user selected country, the state value should change accordingly.

I am still new in ASP.NET and I know in PHP it can be easily done using javascript.

May I know how to do it in ASP.NET using VB language?

View 3 Replies (Posted: May 18 at 15:13)

Sponsored Links:

Related Forum Messages For vbnet category:
Change A Drop-down Menu In VB From Click-to-change To Just Change When Selected?
I'm using Visual Studio 2010 / VB / dot net 4.0, and I have a drop-down menu in my left column that switches resource languages for the end user. It reads like this:

--------English ------- <<- Engish is always the default top language option
French |
Spanish |


Posted: Feb 4 at 20:31

View 2 Replies!   View Related
Forms :: Drop Down List / Drop Up List?
Does anyone know if it is possible to make a drop down list control (when clicked) list its contents above the item, rather than below? Effectively, I need a drop up list rather than a drop down list...

Posted: 11-22-2004

View 1 Replies!   View Related
Drag/Drop In A Drop Down List?
Is it possible to reorder the elements of a drop down list (combobox) via drag and drop?For example, when the list is dropped down, I want the user to be able to drag the items up or down to reorder them. I tried this (and some google searching) but I'm wondering if its just not possible:

Private Sub cmbClassLists_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles cmbClassLists.MouseDown
If cmbClassLists.DroppedDown And Not cmbClassLists.SelectedIndex = -1 Then


Posted: Apr 5th, 2011

View 2 Replies!   View Related
Drop Down List Box (stop Selecting Item From List)
i want to stop accepting form drop down listbox if certrain criteria is not met [code]how i can cancel the selection of drop down list?

Posted: June 18, 2009

View 3 Replies!   View Related
Drop Down List Get Value?
Protected Sub registerStudButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles registerStudButton.Click


Posted: 2011

View 1 Replies!   View Related
Drop Down List First Value Disappears
I fill a dropdownlist item with the following commands

Posted: November 04, 2011

View 2 Replies!   View Related
Drop Down List From Database?
I am a newbie of using a And I am eager to know everything around. I have a problem that seems hard to find for. I would like to retrieve data from database using drop down list, and select only the fields that i want to retrieve from it.

DesignationTable  From my table i like to display only two in my drop down list


Posted: 7/7/2011

View 4 Replies!   View Related
Finding Value In Drop Down List?
I am trying to compare a calculated date with a value in a dropdown list. The value is a date.toString.This is what I have so far:

Dim sched = scheduleDateVal.toString("d"
If Holidays.Items.Contains(New ListItem(sched.ToString("d"))) Then
ScheduleDate.Text = scheduleDateVal.AddDays(1).toString("d")
End If

Holidays is a dropdown list bound to a database so that I can add a day to a scheduledate if it happens to fall on a holiday. This works if I add a string value to sched rather than converting scheduledateval to a string.

Posted: May 31st, 2012

View 2 Replies!   View Related
Make Drop Down List?
I'm creating a simulation programe. In one sheet I have a group of cells (AngleConf) that have a drop down list. I would like to make some operations when I change the value of one of these cells. It always works when I insert the new value manually. But it doesn't always works when I change it by selecting the value from the list. I supose that that happens because of some option that I change while I'm working but I can't find out witch one exactly.The code that I think that its implicated:

Sub Worksheet_Change(ByVal Target As Range)
If InRange(Target, Range("AngleConf")) Then
Call resistance 'Actualiser le r�sultat mecanique


Posted: Jan 13th, 2010

View 1 Replies!   View Related
.net - Drop-Down Image List In Winforms?
I'm trying to find a dropdown-style list for images I can use in a program of mine. It's fairly simple, just needs to display a few images in a grid with tooltips for each one, and I need to be able to get whichever one was last picked. For example,[URL] without the tab bar in it. Unfortunately my monetary budget is zero which means I can't purchase any controls?

Posted: Aug 17 09 at 5:11

View 2 Replies!   View Related - Drop Down List Values In Databind
My dropdownlist is set to databine like this...

dt = dal.FillDataTable(SqlConnectionString, "SELECT SQL Query Statement")
dropdownlist1.datasource = dt
dropdownlist1.datatextfield = dt.columns.item(0).tostring

This is turn populates my dropdownlist, when a user selects a value, it is then populated to the remaining textboxes on the remaining forms with a session call...

dropdownlist2.add(ctype(session.item("valOne"), String))

Through this session it populates the one value, is it possible to display the selected value but also include all other dropdownlist items in case they want to change thier selection?

Posted: May 15 at 12:39

View 1 Replies!   View Related
Auto-click On Drop Down List?
I have a need to click on this drop down list and select a month. Here is the HTML code on the site


Posted: Feb 13th, 2011

View 2 Replies!   View Related
Cannot Get Value From Drop Down List And Get INSERT Error
I cannot get the value from the drop down list and I not sure what's wrong with the declaration and the code.

Dim selectedIntake As String = intakeDropDownList.SelectedItem.Text()
Dim selectedSupervisor As String = supervisorDropDownList.SelectedItem.Text()
.supervisor_ID = selectedSupervisor(0), _


This is the error message I get :

The INSERT statement conflicted with the FOREIGN KEY constraint "FK_student_Details_lecturer_Details". The conflict occurred in database "SKTM-AAS", table "dbo.lecturer_Details", column 'supervisor_ID'. The statement has been terminated.

Posted: 31 March 2011

View 4 Replies!   View Related
Code A Price Value From A Drop Down List?
i have four price values in a drop down list and i need to code these values and add them to values from a checklist object i am doing very simple coding ?

Posted: Jul 27th, 2010

View 1 Replies!   View Related
Drag And Drop From Treeview To List Box?
How to drag and drop tree view nodes to list box contol in

Posted: 31 December 2009

View 1 Replies!   View Related
Drop Down Combobox, A List Of Options Are Available?
Is using Public Property the best way to achieve the following.From a drop down combobox, a list of options are available. Each option in the combobox has a number of public properties that need to be associated with it.When a option is selected, the user will then have two buttons that each call a different sub, the appropriate options are passed to the sub.Each option will always have the same properties required to be passed.So I'm looking at something like this.

Public Class Parameters
Public Property server As String
Public Property replica As String
Public Propery path As String
End Class


Posted: March 12, 2012

View 1 Replies!   View Related
Drop Down List Remember Selection
i have two pages.1.aspx and 2.aspx i have a drop down list on the first page and a back and sumbit button on the second page..If i make a selection in the drop down list and go the second page and then go the the first page again with the back button. the drop down list doesnt show the selection that i did.i tried the use "sessions" but didnt work, also tried postback but no luck. I read something about "Enableviewstate" also no luck.[code]

Posted: March 06, 2012

View 2 Replies!   View Related
Forms :: Drop-down List Combobox?
I have created a drop-down list box that holds 8 numbers representing a month span (3, 6, 9, 12, 15, 18, 21, 25 months). In order to prevent users from typing just anything into the text box above the combo box, I changed it to a drop-down listbox. The other requirement that I was hoping to implement was for the user to be able to type a number, after which the selection would jump to the appropriate item (i.e. the user types in '1', and the selection jumps to 12). This partially works. It will jump to 12, for example, but immediately after the user types the '1', the Selected Index event changes. The user cannot scroll down or up after typing in a number.

Posted: 03-23-2010

View 6 Replies!   View Related
Get The Full Name To Display In The Drop Down List?
I have a dataset with a members table that has a first name column and last name column. How do I get the full name to display in the drop down list?

Posted: November 03, 2009

View 2 Replies!   View Related
List Box Drag And Drop The Data
the following code allows me to drag and drop the data, so i can reorder the list box. However, is there are way of seeing the line across the list box where it will be moved to?


Posted: Feb 9th, 2010

View 7 Replies!   View Related
Populating Drop Down List From Another Thread In ASP.NET?
I have multiple drop down lists on a page. They all contain list of countries. So in the background I am getting countries from database and caching them. I would like to populate those drop down lists from another thread. I am also using AJAX controls so I wanted that it all happens at the same time. And also after a user selects a country I want that towns from that country show to the user, and I want that getting towns happens also in another thread so that user can fill other controls while the list is not yet loaded.

I have read somewhere that I should give Page as a parameter to that thread and then find that drop down lists and populate them. But that is not working.

Here is a function that is called when another thread starts:

protected void GetCountries(object o)
if (Session["Countries"] == null)


Posted: Feb 22 09 at 21:24

View 1 Replies!   View Related
Search Through An Excel Drop Down List?
So I have an excel app with a drop down list and it contains many values. Is there a way I can just search through that drop down list in I can't seem to find where these values that populate the drop down list even come from So I thought just searching through it is easier?

Posted: Feb 1st, 2010

View 1 Replies!   View Related
Showing Drop Down List In ComboBox
How can i set the tool combobox when i write any thing the drop down list goes down and data begins to appear?as Google when you want to search for something it begins to suggest words for you. is it a special tool?

Posted: June 07, 2010

View 16 Replies!   View Related
VS 2008 Drop-down List With Checkboxes?
I have to set a drop-down list with multi-select checkboxes. It seems to be a combination of combobox and list capacities (at least as I know them in VB6), so what's the best controller for these purposes in VS2008?

Posted: Oct 11th, 2009

View 1 Replies!   View Related
WinForms Version Drop Down List
what is the Windows Form version of a Drop Down List? I would think a Combo Box, but that only seems to have a Text for the Items, not Text/Value (with Value being my primary key for the table I'm populating it from).

Posted: Dec 29th, 2011

View 2 Replies!   View Related - Remove And Insert Drop Down List Values?
I have a couple of dropdown lists like this

<asp:DropDownList runat="server" OnSelectedIndexChanged="Update_ddls" AutoPostBack="true" ID="ddl1" />
<asp:DropDownList runat="server" ID="ddl2" />


I also have a function called Update_ddls which runs OnSelectedIndexChanged that looks like this


Which removes the selected item in ddl1 from the second dropdown but if I keep changing the ddl1 item then ddl2 won't have any items left in it.

Is there a way to re-add the previously deleted items in the Update_dlls function without re-databinding because if I re-databind I lose the selected item in the ddl?

Posted: Jul 7 11 at 14:34

View 2 Replies!   View Related
Assigning Values To Objects In A Drop Down List?
Im doing the same thing as him but in vb express 2008 what i have is a checklist box of 10 toppings, all of which can be selected, (no max or min) to put on a pizza, and i have 3 radio buttons grouped together for pizza size (S, M, L) i cant figure out how to give them vaules in which(for sake of demonstration) s=$5 m=$7 l=$9 and each topping is $0.25 then make them add up to an order total in a msg box or something like that

Posted: 04-28-2011

View 2 Replies!   View Related
C# - Code Up A Month And Year Drop Down List For ASP.NET?
I have an internal application that I needs to have a drop down list for two date type elements: Month and Year.These values are not in a database or other repository of information.I know I could just setup a list with the values I need by adding them to a dictionary like object (I need to correlate the Month to the numerical representation, January => 01):

var months = new Dictionary<String,String>();
months.Add("01", "January");

The drop down list for the year will be a bit easier as I can just choose a starting year and iterate up to the current or current+1 year in a generic list.Is there a better way to handle these data elements? Something built in, or a good design pattern that I should be implementing?

Posted: May 1 09 at 17:21

View 4 Replies!   View Related
Click Drop Down List And Select A Value Using Webbrowser?
I need to select a drop down list on a web page and select a day of any date...doesn't matter.... Can't figure it out. Here is my code for the button so far and it doesn't work


Posted: Feb 13th, 2011

View 3 Replies!   View Related
Contols(Drop Down,List Box) Values To The Database?
i have the project as below...And i am putting the code over here.Imports System.Data.SqlClient Imports System.Data 'We have to add this line, its mandatory, if u dnt add this line and start declaring the variable "Dim dt As DataTable" Then u will get the error.


Posted: Dec 3rd, 2010

View 2 Replies!   View Related
Drag And Drop - Control To List Sub Categories
I want to have a control listing all subcategories from a database table. What control should I use. then I want to have a treeview with Categories, and be able to drag and drop sub categories onto the Categories. VS 2008

Posted: Oct 23rd, 2009

View 5 Replies!   View Related
Drag N Drop In A List View Within Is Own Columns
I was just wondering, if I have a list view control, with 2 columns, and insert items to those columns, ex:[code]My GOAL is to NOT use a lot of listviews controls to interact from one col to another. Like a drag and drop function between multiple columns.I have found a lot of examples but they only are between from one listview to another.Have you tried This? I want to do this in[code]and some more for the Itemdrag and dragenter events.

Posted: May 27 11 at 0:50

View 1 Replies!   View Related
Drop Down List Giving Me Error On Submit
I am trying to check to see if a value in a textbox is already in a drop down list. If it is, I will simply write to a label. If the textbox value is not in the dropdown list then I want it to write to the dropdownlist.

I am getting the following error Collection was modified; enumeration operation may not execute


Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
For Each value In DropDownList1.Items


Posted: May 17th, 2012

View 3 Replies!   View Related
FormLoad Email Mailbox List (Drop Box)?
One of my clients is going from Server 2000, SQL 2000 w/ VB6 to a new environment of Windows SBS 2008, SQL 2005 standard 64bit, w/ Visual Studios 2005. We have a custom built app written all in VB that has been converted. We already took care restoring the databases and setting up the odbc and such. After conversion, the app threw a couple of errors, and warnings, which have been fixed. We have a formload function that is supposed to populate 2 fields with dropdown information. One is a folders list in outlook and the other is a send recipient. The Recipient field populates fine and the outlook email box does not.Here is the formload code. I can't figure out why this would allow one box to fill and not the other.

Private Sub frmProcessEmail_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
'starts up email


Posted:  07 January 2010

View 4 Replies!   View Related
Copyright © 2005-08, All rights reserved