Skip to content

Instantly share code, notes, and snippets.

@TechplexEngineer
Last active December 19, 2015 15:19
Show Gist options
  • Select an option

  • Save TechplexEngineer/5975008 to your computer and use it in GitHub Desktop.

Select an option

Save TechplexEngineer/5975008 to your computer and use it in GitHub Desktop.
Adding MVC Flash to asp.net MVC4 projects

just after </runtime> add

<system.web.webPages.razor>
  	<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
		<pages pageBaseType="System.Web.Mvc.WebViewPage">
			<namespaces>
				<add namespace="System.Web.Mvc" />
				<add namespace="System.Web.Mvc.Ajax" />
				<add namespace="System.Web.Mvc.Html" />
				<add namespace="System.Web.Routing" />
				<add namespace="MvcFlash.Core.Extensions" />
			</namespaces>
		</pages>
	</system.web.webPages.razor>

in the <configSections>

<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
  		<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
			<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
		</sectionGroup>
/* Styles for Messages
----------------------------------------------------------*/
.messages div, .messages .warning
{
border-radius: 4px;
padding: 8px 35px 8px 14px;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
background-color: #fcf8e3;
border: 1px solid #fbeed5;
}
.messages .success
{
color: #468847;
background-color: #dff0d8;
border-color: #d6e9c6;
}
.messages .info, .messages .notice
{
color: #3a87ad;
background-color: #d9edf7;
border-color: #bce8f1;
}
.messages .error
{
color: #b94a48;
background-color: #f2dede;
border-color: #eed3d7;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment