I have a GIT repository and I'm using Umbraco. Once strange thing that was happening to me were my files in the css folder kept on being modified even though I wasn't changing them. So every time I wanted to commit a change I'd have to undo the css file changes.
I thought this was Umbraco and because I had my style sheet linked to the rich text editor datatype, but it turned out to be the uSync package. I was synchronizing Stylesheets so by turning this off in the uSyncSettings.config file this stopped the problem. I don't need uSync to manage these files for me.
Showing posts with label stylesheet. Show all posts
Showing posts with label stylesheet. Show all posts
Monday, 31 March 2014
Thursday, 23 October 2008
How do you programtically add a stylesheet link with .NET
This is how you add a stylesheet link programatically:
HtmlLink newStyleSheet = new HtmlLink();
newStyleSheet.Href = "your.css";
newStyleSheet.Attributes.Add("type", "text/css");
newStyleSheet.Attributes.Add("rel", "stylesheet");
newStyleSheet.Attributes.Add("media", "screen");
Page.Header.Controls.Add(newStyleSheet);
Labels:
Addon,
c#,
htmllink,
link,
progamatically,
stylesheet
Subscribe to:
Posts (Atom)