title: How to trigger CallBack method on carousel Hero Card action in Bot Framework C#
body: <p>I am working on BOT Framework(C#), I am facing one issue and need your help.
  Below code is for showing the carousel of Hero card and on the selection of one of Hero Card I want to call a callback method, in below example you can see <strong>OnCardSelection</strong> is the method which I want to call on Card selection, but on execution of line <strong>context.Wait(onCardSelection)</strong> i am getting below error</p>
  
  <blockquote>
    <p>invalid need: expected Call, have Wait</p>
  </blockquote>
  
  <p>and may be due to this it is ending the conversation and consider further action (Click on Hero card) as a new conversation.
  Also, I want to access details of the card in <strong>OnCardSelection</strong> method.
  How to achieve this.
  Thank you.</p>
  
  <pre><code>[LuisModel("your sub key", "secret")]
  [Serializable]
  public class BotManager : LuisDialog&lt;object&gt;
  {
      public async Task RaiseTicket(IDialogContext context, LuisResult result)
      {
       PromptDialog.Confirm(
                      context: context,
                      resume: ResumeAndHandleConfirmRaiseTicketAsync,
                      prompt: "It looks like you want to raise a ticket. Do you want to continue?",
                      retry: "I didn't understand. Please try again.");
      }
  
  
      private async Task ResumeAndHandleConfirmRaiseTicketAsync(IDialogContext context, IAwaitable&lt;bool&gt; argument)
      {
          bool choicesAreCorrect = await argument;
          if (choicesAreCorrect)
          {
             RaiseTicket objRaiseTicket = new RaiseTicket();
             await objRaiseTicket.StartAsync(context);
          }
          else
          {
             await context.PostAsync("Okay");
          }
      }
  }
  
  [Serializable]
  public class RaiseTicket
  {
         public async Task StartAsync(IDialogContext context)
         {
            TypeOfTicket typeOfTicket;
            context.UserData.TryGetValue("TypeOfTicket", out typeOfTicket);
            if (typeOfTicket == TypeOfTicket.None)
            {
                //RaiseTicket
            }
            else
            {
                await PickExactCategory(context);
            }
         }
  
          public async Task PickExactCategory(IDialogContext context)
          {
              var message = context.MakeMessage();
              message.AttachmentLayout = AttachmentLayoutTypes.Carousel;
              message.Attachments = GetCardsAttachments(categoryList);
              await context.PostAsync(message);
              context.Wait(OnCardSelection);
          }
  
  
          protected async Task OnCardSelection(IDialogContext context, IAwaitable&lt;IMessageActivity&gt; result)
          {
               var answer = await result;
               context.Done(new object());
          }
  
          private IList&lt;Attachment&gt; GetCardsAttachments(Categorylist[] categoryList)
          {
              List&lt;Attachment&gt; lstAttachment = new List&lt;Attachment&gt;();
              foreach (Categorylist item in categoryList)
              {
                 lstAttachment.Add(GetHeroCard(
                 item.Title, item.SubTitle,item.Text,
                 new CardAction(ActionTypes.ImBack, "Select", value: item.Tier3)));
              }
             return lstAttachment;
          }
  
          private static Attachment GetHeroCard(string title, string subtitle, string text, CardAction cardAction)
          {
              var heroCard = new HeroCard
              {
                Title = title,
                Subtitle = subtitle,
                Text = text,
                Buttons = new List&lt;CardAction&gt;() { cardAction },
              };
          return heroCard.ToAttachment();
          }
      }
  </code></pre>