BotFramework-WebChat
BotFramework-WebChat copied to clipboard
Passing query string in iFrame and reading them in the BOT code
Hello,
I am passing the userId from the iFrame like below, and this iFrame is embedded on the master screen of our website.
and trying to read it from the bot code like below, which is called from the StartAsync method
userid = context.Activity.From.Id;
But I get some junk values into the userId, and when I do the F12 into the iFrame, I do see the proper userid appended to the iframe src.
Any suggestions on where I am going wrong will be highly appreciated. Thanks.
Please try:
<iframe src="https://webchat.botframework.com/embed/BotId?s=BOTSecret&userid=<%=UserId %>" height="400" ></iframe>
Closing due to inactivity.