问题:我们无法从Bot应用程序中的英雄卡中获取选定的卡值
代码:
string val = message.Text; //this value every time coming null after selected card button.
ResultInCSV = URL;
Activity replyToConversation = (Activity) context.MakeMessage();
RootObjects holder = JsonConvert.DeserializeObject < RootObjects > (ResultInCSV);
List < Attachment > a = new List < Attachment > ();
Attachment attach = new Attachment();
for (int v = 0; v < holder.VehicleListsResult.Count; v++) {
attach = GetHeroCard(
holder.VehicleListsResult[v].Name,
"",
holder.VehicleListsResult[v].ID.ToString(),
new CardImage(url: holder.VehicleListsResult[v].ImagePath),
new CardAction(ActionTypes.ImBack, holder.VehicleListsResult[v].Description, value: holder.VehicleListsResult[v].ID.ToString()));
a.Add(attach);
}
replyToConversation.AttachmentLayout = AttachmentLayoutTypes.Carousel;
replyToConversation.Attachments = a;
await context.PostAsync(replyToConversation);