I'm exploring Syn Bot(Oscova), which I have applied in simple asp.net web application with .net framework 4.6.1 It is working completely fine but I'm not able to apply custom style to it. Yes, It has very good default style, but to apply this chatbot in my project I need to change it.
If anyone have some idea please guide me..
I've used this tutorial for my reference https://www.codeproject.com/Articles/871501/Adding-a-self-hosted-Chatbot-to-an-ASP-NET-website
This is what I've tried this on page
(function () {
$('head').append('<link rel="stylesheet" type="text/css" href="/BotStyle.css">');
var styleElement = document.createElement('style');
styleElement.type = 'text/css';
styleElement.href = '/BotStyle.css?Get=Style';
//styleElement.href = '/BotStyle.css';
styleElement.rel = 'stylesheet';
styleElement.media = 'all';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(styleElement);
})();
I've also tried on Codebehind
bot = new OscovaBot();
WidgetChannel = new WidgetChannel(bot);
bot.Dialogs.Add(new AppDialog());
bot.Dialogs.Add(new ProductDialog());
bot.Trainer.StartTraining();
var websiteUrl = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority);
WidgetChannel.ServiceUrl = websiteUrl + "/BotService.aspx";
WidgetChannel.ResourceUrl = websiteUrl + "/BotResources";
WidgetChannel.UseExternalResource = true;
//WidgetChannel.ResourceUrl = websiteUrl + "/BotStyle.css";
//WidgetChannel.UseExternalResource = true;
//WidgetChannel.ExportResources("/BotStyle.css");
As per its official documentation https://developer.syn.co.in/tutorial/bot-channels/widget-channel.html It is mentioned that we can customize stylesheet by Exporting it and making changes in it, but then what? How to connect that exported file to project??