Too many JavaScript and CSS files on my ASP.NET MVC 2 Master Page?

后端 未结 2 431
别那么骄傲
别那么骄傲 2021-01-15 12:39

I\'m using an EditorTemplate DateTime.ascx in my ASP.NET MVC 2 project.

<%@ Control Language=\"C#\" Inherits=\"System.Web.Mvc.ViewUserControl         


        
2条回答
  •  臣服心动
    2021-01-15 13:39

    First idea that comes to mind =>

    Template:

    <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
    <%: Html.TextBox(String.Empty, Model.ToString("M/dd/yyyy h:mm tt")) %>
    
    

    masterpage or shared external JS file:

      function MakeSureAnyTimeIsIncluded(){
        if (!anyTimeIsIncluded)
          //document.write(
    
                                     
                  
提交回复
热议问题