gpt4 book ai didi

asp.net - 我该如何解决这个陈述

转载 作者:搜寻专家 更新时间:2023-10-31 19:27:29 24 4
gpt4 key购买 nike

我为我的 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 - 我该如何解决这个陈述,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9076785/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com