How can I get syntaxic coloration for Master Pages in MonoDevelop? - master-pages

I think the title speaks for it self...
I mean, I can edit my master page file, it compiles and all but all the text is black. It's ok when it comes to .aspx or .ascx file but not for master pages...
Any ideas ?

File a bug against MonoDevelop, and hopefully it will be fixed in the upcoming 2.4 release.

Related

I can't find a layout file in settings page of Umbraco version8 but it can normal display in website

I have trouble when I deal with a case that made by former colleague.
He made a home.cshtml and layout just only write one line:
#{ Layout = "master.cshtml"; }
I click any tree list in settings page but still can't find any file named master.cshtml!
But header is normal display of the webpage.
I really really so confused...
I check the file in visual code, I really sure the master.cshtml is header of home.cshtml, but in the Umbraco online,I just can't find the Mysterious File!
Where is it going!?
I need find the file to change text...
I try to search keyword like :Umbraco layout but can't find right answer for me... if you know what happen and what is the answer, please tell me, I can't thank you enough!
Every project is individual. But commonly developers store layout pages in the "Partial" folder.
The Layout/Master.cshtml file might not be created through Umbraco, but might be created through e.g. Visual Studio or Visual Studio Code, meaning Umbraco isn't aware that it exists.
To edit it, you would then have to edit the file directly through FTP, using an editor such as Visual Studio Code or similar.

Js and css files not loading from bundle.cs after upgrading umbraco (return 404)

we upgraded our umbrao from 7.10.0V to 7.12.4V.
after installation we have noticed that all js & css files which suppose load from bundle.cs return 404 status.
why is that happened?
thank you all!
after searching for an answer we've noticed that global.asax not fired at all!.
seeing the history of the file showed that
<%# Application Codebehind="Global.asax.cs" Inherits="**" Language="C#" %>
line was overridden after the upgrade.
changing this code back to what it was fixed the problem :).
Have yoou checked namespace of Global.asax? Maybe still novice to umbraco.
Needed: Umbraco.Global instead of: Umbraco.Web.UmbracoApplication

ASP.NET MVC with Bootstrap 3 Not Rendering correctly

I'm using Visual Studio 2013 RC to create a new ASP.NET MVC project. Running the sample generated by the template works as expected. When I update bootsrap to the latest version (3) and rerun the application, my navigation bar is not rendering correctly. It's basically collapsed with just the "Application Name" link and icon in the upper left corner. If I click on it, then the menu appears, but only vertically. Something clearly wrong. Anyone else seeing this behavior?
The structure of many items - including the navbar - has changed from Bootstrap 2 to 3. If you just start applying the v3 CSS to the v2 code, things are bound to go heywire.
I would start with checking out the Bootstrap 3 docs for the navbar (http://getbootstrap.com/components/#navbar) and update your HTML accordingly. Then see if you are still having an issue.
Thanks everyone for the feedback/discussion. This was indeed helpful. For the benefit of the discussion, I found this post to be spot on in getting my MVC project updated to Bootstrap 3. This is only temporary though. Once VS RTM's, this shouldn't be an issue.

losing mvc intellisense

My intellisense doesn't work in aspx or ascx pages running mvc 1.0
When I save or build it does not show the intellisense, but if I do a clean then it works
it this a bug or am I missing something ?
thanks
Mayby you already try it, but have you tried to click ctrl + space when writing code, that make apear intellisence when you coding.
I need to use it sometime.
Doing a reset of settings worked for me.
Still no Intellisence inside of href-target-strings though, but I guess that's not suppose to work in current version.

CSS not updated during debugging ASP.NET MVC application

I am working on a test application based on ASP.NET MVC. I am new to CSS stuff so I am learning that as well.
I have created a master page called "new.master" and created a new css "new.css". I am calling the view from controller as:
return View ("About", "new");
What I am doing is that I am frequently updating the css and master page. So I run the application in debug mode frequently. After sometime I stop seeing the effect of changes in css. When I "view source" in chrome and check the css, it shows an old version.
When I change the name of both master page and css, I start to receive updated views but that works for sometime and then again I stop getting the CSS updates. Have you faced this problem? How can I fix it? (Its terribly annoying!)
Your browser is caching the css. If you force a refresh with F5 that should display any changes.
I think this may be a browser cache issue. In in IE and FF I usually do Ctrl + F5 or Ctrl + Refresh button. Also you can manually clear the cache. For IE you can use the IE Dev Toolbar and for Firefox there is Firebug with both you can clear the cache easily. Not sure about chrome, sorry.
Sayed Ibrahim Hashimi
My Book: Inside the Microsoft Build Engine : Using MSBuild and Team Foundation Build
I found another case in which this can happen.
We started our application with just plain links to the CSS files, then switched to using bundling. We updated the old <link href="#Url.Content("~/somePath/someStyle.css")" rel="stylesheet" type="text/css" /> to #Styles.Render("~/Styles/bundles/someStyle").
We also use a few stylesheets which are only needed for some pages, and they have their own bundle. Now, for one of them, we forgot to change the link tag to the #Styles.Render statement.
The result was that this CSS got updated now and then (so we thought everything is OK; the style wasn't missing), but we could not influence when the update happens. When I started making changes to the file, I realized that nothing I do (emptying the cache, rebuilding the project, restarting Cassini) will trigger an update. The browser always got a 304 Not modified.
So, if you have these symptoms, check your links.
Please use Ctrl+F5 to refresh your browser.
F5 may give you the same page even if the content is changed, because it may load the page from cache. But Ctrl - F5 forces a cache refresh, and will guarantee that if the content is changed, you will get the new content.
hope this will help you
Thank you
go to chroom developer panel by right click inspect -> then go to Network tap -> tick the Disable cache checkbox (note: this should always be checked) -> Refresh the page by pressing F5.
this work for me, hope this help others who have this issue! :)
It's very possible that css is being cached in your browser, so simply clearch browser cache, it should help
This happened to me when I had a master view that would load partial views depending on which partial view the user wanted to see, but the answer from this page helped, https://forums.asp.net/t/1763494.aspx?applying+CSS+layouts+to+a+partial+view
CSS must be referenced in the of the Html document. As a
consequence you cannot include them in a partial view...because in
such case the css is included in the Html body. Please plce the style
sheet in head of the page that hosts the partial view.
I would have css links in my partial views and any modifications to the css files would never happen, even if I pressed Ctrl-F5 in the browser. I also tried clearing cache contents in the developer tools. I noticed by viewing the source stylesheets that the css files linked by the partial views were not changing, so the fix for me was to move the css links from the partial view to the main view where these partial views were to be held.
I had something similar happening to me.
Then suddenly noticed the bundle was added to the page:
#Styles.Render("/bundles/classifiedDetailCss")
instead of:
#Styles.Render("~/bundles/classifiedDetailCss")
Note the missing ~ character in the first example.
(The first example only worked after building the project, otherwise it would return a cached version even in debug mode.)
This can help solve this issues in both dev and production.
use asp-append-version="true"

Resources