页面导航: 站长工具网络编程ASP.NET实用技巧 → 正文内容 WebConfig中域名引用

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

投稿:whsnow 字体:[增加 减小] 类型:转载
这篇文章主要介绍了c#网站WebConfig中域名引用,需要的朋友可以参考下
在WebConfig中定义如下。
复制代码 代码如下:

public class WebConfig
{
public static string ResourceServer = @"http://www.xxx.com/"; }

在前台页面中这样调用
复制代码 代码如下:

<script src="../../html/article/<% =webconfig.resourceserver %>/js/jquery-ui-all-min-lastest.js"
type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="../../html/article/<%=webconfig.resourceserver "/css/style.css"%>" />