服务器之家:专注于服务器技术及软件下载分享
分类导航

PHP教程|ASP.NET教程|JAVA教程|ASP教程|

服务器之家 - 编程语言 - ASP.NET教程 - c#网站WebConfig中域名引用示例介绍

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

2019-12-06 12:30whsnow ASP.NET教程

这篇文章主要介绍了c#网站WebConfig中域名引用,需要的朋友可以参考下

WebConfig中定义如下。 

复制代码代码如下:


public class WebConfig 

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


在前台页面中这样调用 

复制代码代码如下:


<script src="<% =WebConfig.ResourceServer %>/js/jquery-ui-all-min-lastest.js" 
type="text/javascript"></script> 
<link rel="stylesheet" type="text/css" href="<%=WebConfig.ResourceServer +"/css/style.css"%>" /> 

延伸 · 阅读

精彩推荐