Format:
Recent snippets matching tags of mvc3
@using Adnug.web.AssetManager; @Html.TextBox(string.Empty, /* Name suffix */ ViewData.TemplateInfo.FormattedModelValue /* Initial value */ ) @this.BeginClientScript() <script type="text/javascript"> (function () { $("#@ViewData.TemplateInfo.GetFullHtmlFieldName(string.Empty)").datetimepicker(); })();
161 Views
1 comments
<!--In Layout - Note that the Render call is made at the end of the body.--> <!DOCTYPE html> <html> <head> <title>@Model.PageTitle</title> @Scripts.Add("jquery-1.6.min.js", 100) </head> <body> @Html.Partial("ToolbarView", Model) @RenderBody()
286 Views
no comments
public static class Scripts { const string ScriptsKey = "Scripts"; public static MvcHtmlString Add(string src, int priority = 0) { var scripts = GetScripts(); scripts.Add(new Script { Src = src, Priority = priority });
363 Views
3 comments
public class UnityControllerActivator : IControllerActivator { private IUnityContainer _container; public UnityControllerActivator(IUnityContainer container) { _container = container; }
227 Views
no comments
protected void RegisterDependencyInjection() { _container = new UnityContainer(); _container.RegisterType<IControllerActivator, UnityControllerActivator>(); _container.RegisterType<ISimpleService, DefaultSimpleService>(); DependencyResolver.SetResolver(new UnityDependencyResolver(_container)); }
174 Views
no comments
public class UnityDependencyResolver : IDependencyResolver { private IUnityContainer _container; public UnityDependencyResolver(IUnityContainer container) { _container = container; }
595 Views
no comments
// This does NOT work, but I believe it should. Fix below @if (!ChatPast.Web.Core.SiteMembership.HasActiveSession) { @{Html.RenderPartial("AnonymousAccountInfo" ); } } else { @{Html.RenderPartial( "RegisteredAccountInfo" ); } } // This does work, but why not above?
1176 Views
3 comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
