如果文件存在,VB.Net将加载JS文件
我试图在一个有多个门户的DotNetNuke站点上实现这一点,所以我想在服务器端VB加载一个javascript文件(如果存在的话)。有什么想法吗?如果文件存在,VB.Net将加载JS文件,.net,asp.net,vb.net,visual-studio,.net,Asp.net,Vb.net,Visual Studio,我试图在一个有多个门户的DotNetNuke站点上实现这一点,所以我想在服务器端VB加载一个javascript文件(如果存在的话)。有什么想法吗? <% 'If the portal.js exists, insert %> <% if System.IO.File.Exists(Server.MapPath(PortalSettings.HomeDirectory & "portal.js")) then %> <script src="<%= P
<% 'If the portal.js exists, insert %>
<% if System.IO.File.Exists(Server.MapPath(PortalSettings.HomeDirectory & "portal.js")) then %>
<script src="<%= PortalSettings.HomeDirectory %>portal.js"></script>
<% end if %>