当前位置:首页 >> 网络编程

c#网站WebConfig中域名引用示例介绍

在WebConfig中定义如下。
复制代码 代码如下:
public class WebConfig
{
public static string ResourceServer = @"http://www.xxx.com/"; }

在前台页面中这样调用
复制代码 代码如下:
<script src="/UploadFiles/2021-04-02/jquery-ui-all-min-lastest.js">type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="<%=WebConfig.ResourceServer +"/css/style.css"%>" />