Saturday 16 April 2016

DNN switch style when language switched

If you want to change the layout or the skin of your pages when the language changed;

update the Default.aspx.cs page, by the follwoing code

Search about
ClientResourceManager.RegisterStyleSheet(this, string.Concat(ctlSkin.SkinPath, "skin.css"), FileOrder.Css.SkinCss);

commit it and add the following code bellow it,

if (System.Threading.Thread.CurrentThread.CurrentCulture.Name == "en-US")
            {
                ClientResourceManager.RegisterStyleSheet(this, ctlSkin.SkinPath + "skin.css", FileOrder.Css.SkinCss);
            }
            else
            {
                ClientResourceManager.RegisterStyleSheet(this, ctlSkin.SkinPath + "rtl.skin.css", FileOrder.Css.SkinCss);
            }

Monday 4 April 2016

How to make all scripts in your Visual Studio Project Auto-folding (intellisense)

Add Any js file in your project and anywhere, when you want visual studio to help you coding JS (like jquery) just right click on your project (Not on the solution) >>Add >> _references.js ...

after you click; visual studio will create a new folder called Scripts and add _references.js in it, this file will has links to all .js files in your project, 

Enjoy Coding