c#网站WebConfig中域名引用示例介绍
本文向大家介绍c#网站WebConfig中域名引用示例介绍,包括了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"%>" />