ASP.Net Master Page and File path issues

后端 未结 10 1511
余生分开走
余生分开走 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

    If this script tag goes directly to the browser, then you unlikely can substitute your site's root there. At least not on the server. So you can:

    1. Deploy site to the root of domain name and use absolute paths (simplest solution).
    2. Insert this link with server control.
    3. Preprocess resulting HTML before sending it to the client (with HttpResponse.Filter).

提交回复
热议问题