title: Adaptive Card: Dynamically show Card on dropdown click in Adaptive Card : Bot Builder
body: <p>I have to create a adaptive card which have city of name and each city have different holiday list.
  I have to show city name in dropdown list and on selection of each city i have to show child card which contains Holiday list.</p>
  
  <p>I have develop below code:</p>
  
  <pre><code>private async Task&lt;DialogTurnResult&gt; ShowCard(WaterfallStepContext stepContext, CancellationToken cancellationToken)
  {
      List&lt;string&gt; city = new List&lt;string&gt;() { "Delhi", "Bangalore", "Mumbai" };
      List&lt;string&gt; date = new List&lt;string&gt;() { "1-Jan", "26-Jan", "15-Aug" };
      List&lt;string&gt; des = new List&lt;string&gt;() { "New Year", "Republic Day", "Independence Day" };
  
      List&lt;string&gt; date1 = new List&lt;string&gt;() { "1-Jan", "26-Jan", "15-Aug", "25-Dec" };
      List&lt;string&gt; des1 = new List&lt;string&gt;() { "New Year", "Republic Day", "Independence Day", "Christmas Day" };
  
      List&lt;string&gt; date2 = new List&lt;string&gt;() { "1-Jan", "25-Dec" };
      List&lt;string&gt; des2 = new List&lt;string&gt;() { "New Year", "Christmas Day" };
  
      List&lt;AdaptiveCard&gt; cards = new List&lt;AdaptiveCard&gt;();
      cards.Add(HolidayListAdaptiveCard(date, des));
      cards.Add(HolidayListAdaptiveCard(date1, des1));
      cards.Add(HolidayListAdaptiveCard(date2, des2));
  
      var mainCard = new AdaptiveCard(new AdaptiveSchemaVersion(1, 0));
      var column3 = new AdaptiveColumn();
      column3.Items.Add(new AdaptiveTextBlock() { Text = "Holiday City", Weight = AdaptiveTextWeight.Bolder });
      var columnSet1 = new AdaptiveColumnSet();
      columnSet1.Columns.Add(column3);
      var container1 = new AdaptiveContainer();
      container1.Style = AdaptiveContainerStyle.Emphasis;
      container1.Items.Add(columnSet1);
      mainCard.Body.Add(container1);
  
      List&lt;AdaptiveShowCardAction&gt; adaptiveShowCardActions = new List&lt;AdaptiveShowCardAction&gt;();
      for (int i = 0; i &lt; city.Count; i++)
      {
          mainCard.Actions.Add(new AdaptiveShowCardAction() { Title = city[i], Card = cards[i] });
      }
  
      var attachment = new Attachment
      {
          ContentType = AdaptiveCard.ContentType,
          Content = mainCard
      };
      var reply = MessageFactory.Attachment(attachment);
      await stepContext.Context.SendActivityAsync(reply);
      return new DialogTurnResult(DialogTurnStatus.Waiting);
  }
  
  private AdaptiveCard HolidayListAdaptiveCard(List&lt;string&gt; date, List&lt;string&gt; description)
  {
      var card = new AdaptiveCard(new AdaptiveSchemaVersion(1, 0));
      List&lt;AdaptiveColumn&gt; columns = new List&lt;AdaptiveColumn&gt;();
      var column = new AdaptiveColumn();
      var column1 = new AdaptiveColumn();
      var column2 = new AdaptiveColumn();
  
      var textBlock = new AdaptiveTextBlock();
      textBlock.Text = "Sr. No";
      textBlock.Weight = AdaptiveTextWeight.Bolder;
      textBlock.Size = AdaptiveTextSize.Large;
      textBlock.Color = AdaptiveTextColor.Accent;
      column.Items.Add(textBlock);
  
      var textBlock1 = new AdaptiveTextBlock();
      textBlock1.Text = "Date";
      textBlock1.Weight = AdaptiveTextWeight.Bolder;
      textBlock1.Size = AdaptiveTextSize.Large;
      textBlock1.Color = AdaptiveTextColor.Good;
      column1.Items.Add(textBlock1);
  
      var textBlock2 = new AdaptiveTextBlock();
      textBlock2.Text = "Description";
      textBlock2.Weight = AdaptiveTextWeight.Bolder;
      textBlock2.Size = AdaptiveTextSize.Large;
      textBlock2.Color = AdaptiveTextColor.Dark;
      column2.Items.Add(textBlock2);
  
      for (int i = 0; i &lt; date.Count; i++)
      {
          column.Items.Add(new AdaptiveTextBlock() { Text = (i + 1).ToString() });
          column1.Items.Add(new AdaptiveTextBlock() { Text = date[i] });
          column2.Items.Add(new AdaptiveTextBlock() { Text = description[i] });
      }
  
      var columnSet = new AdaptiveColumnSet();
      columnSet.Columns.Add(column);
      columnSet.Columns.Add(column1);
      columnSet.Columns.Add(column2);
      var container = new AdaptiveContainer();
      container.Style = AdaptiveContainerStyle.Emphasis;
      container.Items.Add(columnSet);
      card.Body.Add(container);
      return card;
  }
  </code></pre>
  
  <p>O/P:</p>
  
  <p><a href="https://i.stack.imgur.com/6VUaS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6VUaS.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/F77v4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F77v4.png" alt="enter image description here"></a></p>
  
  <p>Issue: City name coming as separate button but i need city name in dropdown list.</p>