ASP.Net Master Page and File path issues

后端 未结 10 1525
余生分开走
余生分开走 2020-11-28 02:33

I\'m trying to add a script reference to jQuery in my master page so that it will work for any page. It currently looks like this



        
10条回答
  •  孤街浪徒
    2020-11-28 02:59

    Try <%# instead of <%= in Master page under head section

    
    

    Then in Code Behind of Master page under Page_Load Event

    Page.Header.DataBind();
    

    Now you are good to go with either jQuery and JavaScript as well as CSS just you need to change your path in ResolveUrl which file you want to handle CSS, JavaScript, jQuery.

提交回复
热议问题