Beispiel #1
0
		private static string getPartialViewNameForContentType(AvailableContentType contentType)
		{
			string viewName;
			switch (contentType)
			{
				case AvailableContentType.RichText:
					viewName = "_wysiwg";
					break;
				case AvailableContentType.EmbeddedYouTube:
					viewName = "_youtube";
					break;
				default:
					throw new NotImplementedException("Invalid content type specified");
			}

			return viewName;
		}
Beispiel #2
0
		public PartialViewResult TypeSpecificInput(AvailableContentType contentType, string value)
		{
			var name = getPartialViewNameForContentType(contentType);

			return PartialView(name, value);
		}