the click even for tha list box is the event, run a switch to check tha item number that was clicked. update the info based on the item number...
I have a concatenated dropdown list getting values from several SQL Server database fields in two different tables. The dropdown populates just fine (C#, Visual Studio 2003, .NET 1.1). What I need to be able to do is save each value in the list when a user makes a selection. The relevant portion of the code populating the list is below, to make it easier for you to see what I'm doing:
if( read.Read() )
{
do
{
Location = ""; Address = ""; City = ""; State = ""; Zip = "";
if( !read.IsDBNull(1) ) Location = read.GetString(1);
else Location = "Unnamed Location";
if( !read.IsDBNull(2) ) Address = read.GetString(2);
if( !read.IsDBNull(3) ) City = read.GetString(3);
if( !read.IsDBNull(4) ) State = read.GetString(4);
if( !read.IsDBNull(5) ) Zip = read.GetString(5);
myItem = new ListItem(Location + ": " + Address + ", " + City + ", " + State + " " + Zip);
ddlAddress.Items.Add(myItem);
} while( read.Read() );
}
read.Close();
The results will read (sample) as "LOCATION X: 123 Main Street, Anytown, USA 10032"
Again, this portion of my code is working. But once the user makes a selection, I need to call a stored procedure to update a third (as yet unpopulated) database table. I need Address added to the Address field, etc. I know how to write the SQL but I do not know how to write the C# to state which portion of the list should be used for each field to be updated. There is no single ID identifying each group of fields as a single address.
Please let me know if you need more information.

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic