botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Trigger C# Function on click of Hero Card Button

Open neetgupta7 opened this issue 9 years ago • 1 comments

Hello I want to trigger a C# function on click of button on Hero Card (or any other rich card). While I have read many blogs about the same not many explain how to do it. Can someone please explain and also provide the code snippet for C#. This was raised as an issue number #2976 but it I did not find the answer satisfactory.

I have seen the standard piece of code shared in #2976 which allows me to launch any url from the Hero card. What I am looking at is a functionality similar to PromptDialog.Choice where when a user chooses an option the control is passed on to a specific C# function. And I want a similar functionality with a Hero Card as it has a richer UI.

So for e.g. I show user a carousel of Hero Cards to choose a particular Cuisine. And when user clicks on a button on Hero Card it should capture user's choice and pass the control back to a particular C# method.

Above method will simply launch the url and my code would not know what was clicked.

neetgupta7 avatar Jun 22 '17 06:06 neetgupta7

Refer #2976 for the solution.

neetgupta7 avatar Jun 22 '17 07:06 neetgupta7