asp.net – 我该如何解决这个问题
发布时间:2020-12-16 09:36:15 所属栏目:asp.Net 来源:网络整理
导读:我为asp.net网站下载了一个模板.这些模板适用于Joomla CMS.我转换了所有,但我在标题中有一些问题,无法理解它做了什么,我怎么能专门为asp.net: jdoc:include type="head" / link rel="stylesheet" href="?php echo $this-baseurl ;?/templates/system/css/sy
我为asp.net网站下载了一个模板.这些模板适用于Joomla CMS.我转换了所有,但我在标题中有一些问题,无法理解它做了什么,我怎么能专门为asp.net:
<jdoc:include type="head" /> <link rel="stylesheet" href="<?php echo $this->baseurl ;?>/templates/system/css/system.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $this->baseurl ;?>/templates/system/css/general.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $this->baseurl ;?>/templates/<?php echo $this->template ;?>/css/template.css" type="text/css" /> <!--<?php if($this->direction == 'rtl') : ?> --> <link href="<?php echo $this->baseurl ;?>/templates/<?php echo $this->template ;?>/css/template_rtl.css" rel="stylesheet" type="text/css" /> <?php endif; ?> <!--[if lte IE 7]> <link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/ie7.css" rel="stylesheet" type="text/css" /> <![endif]--> <!--[if lte IE 6]> <link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/ie6.css" rel="stylesheet" type="text/css" /> <![endif]--> <link id="JTKLocalCss" href="css/template.css" rel="stylesheet" type="text/css" /> 解决方法
您可以将代码<?php echo $this-> baseurl?> /替换为<%= this.ResolveUrl(“?/”)%>
对于代码<?php echo $this-> template?>,请将其替换为<%= this.ResolveUrl(“?/”)%>然后你必须在代码隐藏中定义一个模板访问器: protected string Template { get; set; } 然后需要设置(例如在PageLoad上)以便属性填充上面的代码. 对于<?php if($this-> direction ==’rtl’):?> …<?php endif; ?>声明,这可以替换为: <% if(this.Direction) {%>...<%}%> 同样,这将需要代码隐藏中的访问器,就像模板示例一样. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net-mvc – MVC.net获取枚举显示名称而不必参考枚举类型
- asp.net-mvc – 如何创建ASP.NET MVC控制器从查询字符串接受
- asp.net – 在Inproc模式下与页面只读的会话锁争用
- asp.net-mvc – 可以使用ASP.Net MVC Razor视图来生成格式很
- asp.net-core – VS 2017安装后无法运行基于project.json的
- asp.net – Form .NET中的输入元素名称
- asp.net-mvc – MVC存储库模式:创建模型类
- asp.net – Dotnetopenauth oAuth服务提供商的解释
- asp.net-web-api – 设计REST ful ODATA API,结果集为空时如
- 如何将旧版ASP应用程序转换为ASP.NET?
推荐文章
站长推荐
- 在Mvc asp.net中获取选中的复选框值
- asp.net-mvc – 可以在ASP.NET MVC中本地化URL /
- 什么可能导致asp.net应用程序忘记用户?
- ASP.NET MVC Controller.Json DateTime序列化与N
- asp.netcore3.0 netstandard2.1 使用 DbProvider
- asp.net-mvc – 如何从ActionExecutingContext获
- 在IIS Express中无法启动asp.net核心Web应用程序
- asp.net-mvc-4 – 使用导航路由的ASP.NET,Twitte
- asp.net-mvc – 需要经过身份验证的用户的Ajax调
- efcore 新特性 SaveChanges Events
热点阅读