Ramco Ramco

Ramco Ramco

  • 443
  • 3.4k
  • 527k

Dropdown List

Aug 22 2022 4:12 PM

Hi

   I have below code & i want on the basis of StateCollection , i want to display Locations in another dropdown

private void GetData()
        {
            string StateCollection = "";
            //List<string> StateCollection = new List<string>();
            if (lstState.Items.Count > 0)
            {
                for (int i = 0; i < lstState.Items.Count; i++)
                {
                    if (lstState.Items[i].Selected)
                    {
                        StateCollection += lstState.Items[i].Value.ToString() + ",";
                    }
                }
            }
        }

 

In Location i have below fields

LocationId = int

StateCode = int

LocationName = varchar(30)

Thanks


Answers (1)