Ramco Ramco

Ramco Ramco

  • 440
  • 3.4k
  • 520k

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)