Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Side Menu is hidden when opened main page at first time ASP.NET WebForms

Hello Support, I attach new theme to my application. built with ASP.NET Webforms. the sidebar menu is hidden when open the page at first time.

see video please: https://www.youtube.com/watch?v=WZOLQ2397qM

I test it in real host as you see in the video above.

Could you tell me if there's maybe javascript function to refresh menu at first time or something?

I use latest Metronic 8.2.8 version (Demo1)

my full

Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (4)


Hi,

Thank you for reaching out to us.

By default, when you switch direction, the sidebar must be open.

Please make sure that you have data-kt-app-sidebar-minimize="on" attribute added on your body element.

You can only set the default direction in thememode.json to change the direction dynamically, you should store user user-selected mode somewhere on your server, and then, if the value is set, use this value in KTBootstrapBase.InitThemeMode().

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Hi, Lauris Stepanovs
I use conditional rendering mechanism that is exist in webforms.
in <head> tag i do this.


<!-- Fonts -->
<% if (ExaCloud.FExaAccounts.UserLang == 2)
{ %>
<link rel="stylesheet" href=" />
<% }
else
{ %>
<link rel="stylesheet" href=" />
<% } %>

<!-- Plugin Styles -->
<% if (ExaCloud.FExaAccounts.UserLang == 2)
{ %>
<link rel="stylesheet" href="/assets/plugins/global/plugins.bundle.rtl.css" />
<% }
else
{ %>
<link rel="stylesheet" href="/assets/plugins/global/plugins.bundle.css" />
<% } %>

<!-- Main Style -->
<% if (ExaCloud.FExaAccounts.UserLang == 2)
{ %>
<link rel="stylesheet" href="/assets/css/style.bundle.rtl.css" />
<% }
else
{ %>
<link rel="stylesheet" href="/assets/css/style.bundle.css" />
<% } %>



after that i don't find any flickers or any issues with sidebar.
and when user change language i just refresh a whole page. window.location.reload();

It works great now...
So now I don't think I need KTBootstrapBase.InitThemeMode() alright??


Hi,

Sorry for the late reply.

KTBootstrapBase.InitThemeMode() sets the default theme mode from Starterkit/_keenthemes/config/themesettings.json. If you don't want to use the configuration, you can just set the default mode directly in Starterkit/Views/Partials/ThemeMode/_Init.cshtml.

Regards, Lauris Stepanovs, Keenthemes Support Team


Please note I use RTL version and LTR version both.
When app start if UserLang is AR then call SetRtlMode method and change stylesheet with rtl.css versions.


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(