ASP条件包括错误的Microsoft VBScript编译错误“800a0400” [英] asp conditional include error Microsoft VBScript compilation error '800a0400'

查看:333
本文介绍了ASP条件包括错误的Microsoft VBScript编译错误“800a0400”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我跟玛莎的建议在这里:
<一href=\"http://stackoverflow.com/questions/35610851/if-page-is-default-then-include-if-not-default-then\">if页面则默认包括如果没有则默认
而我失去了一些东西,因为我不能让它显示滑块。

I followed Martha's suggestion here: if page is default then include if not default then And I am missing something, as I can't get it to display the slider.

下面是滑盖code,以及如何我使用Martha'e建议。

Here is the slider code, and how I am using Martha'e suggestion.

这是滑块(引导旋转木马)code(与玛莎的建议被整合)

This is the slider (bootstrap carousel) code (to be integrated with Martha's suggestion)

<div class="jumbotron">
    <div class="container">
        <div class="row fz-slider-wrap">
            <div class="col-md-4 fz-slider-caption">
                DFD Fioriere
            </div>
            <div class="col-md-8 fz-slider-image">
                <div id="fz-gallery-slider" class="carousel slide" data-ride="carousel">
                    <!-- Indicators -->
                    <ol class="carousel-indicators">
                    <li data-target="#fz-gallery-slider" data-slide-to="0" class="active"></li>
                    <li data-target="#fz-gallery-slider" data-slide-to="1"></li>
                    <li data-target="#fz-gallery-slider" data-slide-to="2"></li>

                    </ol>
                    <!-- Wrapper for slides -->
                    <div class="carousel-inner">
                        <div class="item active">
                        <img class="fz-img-box" src="images/slider/03.jpg" alt="slider 1" />
                        </div>
                        <div class="item">
                        <img class="fz-img-box" src="images/slider/01.jpg" alt="slider 2" />
                        </div>
                        <div class="item">
                        <img class="fz-img-box" src="images//slider/06.jpg" alt="slider 3" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div><!-- .jumbotron -->

这是发生了什么:
如果我把上面的code里面

This is what happens: If I put the above code inside

<%
Sub DisplaySlider()
slider code
    %>
<%
End Sub
%>

加载的default.asp,当我得到这个错误

I get this error when loading default.asp

微软VBScript编译错误800a0400

Microsoft VBScript compilation error '800a0400'

预计声明

/afz_includes/jumbotron.asp,第3行

/afz_includes/jumbotron.asp, line 3

如果我换滑盖code在我得到同样的错误,但4号线
如果我换滑盖code在我得到同样的错误(3号线)
我也试着换滑盖code与每行,并chnaged了类和ID来',但继续得到错误个

If I wrap slider code in ' I get same error but line 4 If I wrap slider code in " I get same error (line 3) I also tried to wrap each line of slider code with ", and chnaged the " of classes and ids to ', but keep getting th error.

下面是我穿上的default.asp和其他页面

Here is what I put on the default.asp, and the other pages

<!-- #include virtual="/afz_includes/slider.html" -->
<%
scriptname = Request.ServerVariables("Script_Name")
If InStr(scriptname, "default.asp") > 0 Then
    DisplaySlider
Else
    Response.Write "<div class='fz-v-spacer-top'></div>"
End If
%>

我不知道这是否是一个错字,总之我试图挽救滑块既作为HTML和ASP,但同样的错误。

I am not sure if it was a typo, anyhow I tried to save the slider both as html, and asp, but same error.

推荐答案

看起来你已经把滑块的code中的ASP code分隔符(在&LT;%%GT; ),因此编译器正试图把它当作VBScript中,它显然不是。

It looks like you've put the slider's code inside the ASP code delimiters (the <% and %>), so the compiler is trying to treat it as VBScript, which it obviously isn't.

在ASP经典,你把里面的&LT你的服务器端VBScript code;%%GT; 块。 HTML code做的的去那些块里面,除非你是的Response.Write -ing它。

In ASP classic, you put your server-side VBScript code inside <% %> blocks. HTML code does not go inside those blocks, unless you're Response.Write-ing it.

<%
Sub DisplaySlider()
%>
<div class="jumbotron">
    <div class="container">
        ...
    </div>
</div><!-- .jumbotron -->
<%
End Sub
%>

这篇关于ASP条件包括错误的Microsoft VBScript编译错误“800a0400”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆