做了一个机票实时查询的网站,调用的是外部的接口。查询结果页面是什么都显示不出来(这个显示不出来,不仅仅是查询结果显示不出来,而是所有的html元素都没有显示,甚至是一个Table,一个<img>,反正看上去整个页面就完全是一片空白的),但是明明是有代码啊。
还有更加郁闷的是,假如在<body></body>加上<body onload="alert(1)"></body>,这个“1”也是打印不出来的。真TM见鬼了,好像所有的代码都没有被执行一样的,这是什么原因啊。
顺便说下,接口公司就给了我几个DLL文件和一个searchResult.aspx页面,而且这个aspx没有aspx.cs代码文件的。
还有就是如果在空间上面就运行得很好,我拿到本地就是不行。好急啊,公司催着要,这里又出现这样的乱子....
代码如下:<%@ Page language="c#" Codebehind="FlightSearchResult.aspx.cs" AutoEventWireup="true" Inherits="Cn.Netron.Web.FlightSearchResult" %><%@register TagPrefix="PUB" TagName="WeekList" src="FlightWeek.ascx"%>
<HTML>
<HEAD>
<title>国内航班实时查询</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR" />
<meta content="C#" name="CODE_LANGUAGE" />
<meta content="JavaScript" name="vs_defaultClientScript" />
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema" />
<link href="/Flight/Files/Style/Style.Css" rel="StyleSheet" />
<LINK href="/Module/Style/Style.css" type="text/css" rel="stylesheet" />
<LINK href="/Flight/Config/Style1.Css" rel="StyleSheet" />
<script language="javascript" src="/Flight/Files/Scripts/PubJs.js"></script>
<script language="javascript" src="/Flight/Files/Scripts/MyCal.js"></script>
</HEAD>

<body>
<!--#include Virtual="/Module/Includes/Top.asp" -->
<center>
<form id="Form1" style="MARGIN: 0px" method="post" runat="server">
     <DIV class="DivDetailMain">
<DIV class="DivDetailLeft"><!-- 左侧查询 -->
<TABLE style="TABLE-LAYOUT: fixed; WORD-BREAK: break-all" cellSpacing="0" cellPadding="0"
width="98%" align="center" border="0">
<TR>
<TD align="center" height="20"><IMG src="/Flight/Files/Images/Search_1.gif" align="absMiddle">
</TD>
</TR>
<TR style="display:none;">
<TD height="26">航程类型
<asp:RadioButton id="FlightType1" onclick="SetReturn('1');" runat="server" GroupName="FlightType"
Checked="True" Text="单程"></asp:RadioButton>
<asp:RadioButton id="FlightType2" onclick="SetReturn('2');" runat="server" GroupName="FlightType"
Text="往返"></asp:RadioButton></TD>
</TR>
<TR>
<TD height="26">出发城市
<asp:dropdownlist id="BeginCity" runat="server" style="width:110px;" DataValueField="CityCode" DataTextField="Py_Name"></asp:dropdownlist></TD>
</TR>
<TR>
<TD height="26">到达城市
<asp:dropdownlist id="EndCity" runat="server" style="width:110px;" DataValueField="CityCode" DataTextField="Py_Name"></asp:dropdownlist></TD>
</TR>
<TR>
<TD height="26">起飞日期
<asp:textbox id="BeginDate" onclick="event.cancelBubble=true;showCalendar('BeginDate',false,'BeginDate')"
runat="server" style="width:75px;" CssClass="TextBox"></asp:textbox><IMG style="CURSOR: hand" onClick="event.cancelBubble=true;showCalendar('BeginDate',false,'BeginDate')"
src="Files/Images/Calc.gif" align="absMiddle" border="0">
</TD>
</TR>
<TR id="RowReturn" runat="server">
<TD height="26">返程日期
<asp:textbox id="ReturnDate" onclick="event.cancelBubble=true;showCalendar('ReturnDate',false,'ReturnDate')"
runat="server" style="width:75px;" Size="10" CssClass="TextBox"></asp:textbox><IMG style="CURSOR: hand" onClick="event.cancelBubble=true;showCalendar('ReturnDate',false,'ReturnDate')"
src="Files/Images/Calc.gif" align="absMiddle" border="0">
</TD>
</TR>
<TR>
<TD height="26">航空公司
<asp:dropdownlist id="AirLine" runat="server" style="width:110px;" DataValueField="VALUE" DataTextField="TEXT"></asp:dropdownlist></TD>
</TR>
<TR style="DISPLAY: none">
<TD height="26">起飞时间
<asp:dropdownlist id="BeginTime" runat="server" style="width:106px;">
<asp:ListItem Value="">不限</asp:ListItem>
<asp:ListItem Value="0700">07:00</asp:ListItem>
<asp:ListItem Value="0900">09:00</asp:ListItem>
<asp:ListItem Value="1100">11:00</asp:ListItem>
<asp:ListItem Value="1300">13:00</asp:ListItem>
<asp:ListItem Value="1500">15:00</asp:ListItem>
<asp:ListItem Value="1700">17:00</asp:ListItem>
<asp:ListItem Value="1900">19:00</asp:ListItem>
<asp:ListItem Value="2100">21:00</asp:ListItem>
</asp:dropdownlist></TD>
</TR>
<TR>
<TD height="26">排序方式
<asp:dropdownlist id="Sort" runat="server" style="width:106px;">
<asp:ListItem Value="1">起飞时间</asp:ListItem>
<asp:ListItem Value="2">价格</asp:ListItem>
<asp:ListItem Value="3">到达时间</asp:ListItem>
<asp:ListItem Value="4">航空公司</asp:ListItem>
</asp:dropdownlist></TD>
</TR>
<TR height="30">
<TD><IMG src="/Flight/Files/Images/Search_4.gif" align="absMiddle"><asp:HyperLink id="LinkPrev" runat="server" ForeColor="Blue" Font-Underline="True">前一天航班</asp:HyperLink>&nbsp;
<asp:HyperLink id="LinkNext" runat="server" ForeColor="Blue" Font-Underline="True">后一天航班</asp:HyperLink><IMG src="/Flight/Files/Images/Search_5.gif" align="absMiddle">
</TD>
</TR>
<TR height="40">
<TD align="center">
<asp:imagebutton id="BtnSearch" runat="server" ImageUrl="/Flight/Files/Images/Search_2.gif"></asp:imagebutton></TD>
</TR>
<TR>
<TD height="20"><IMG src="/Flight/Files/Images/Search_3.gif" align="absMiddle">
</TD>
</TR>
</TABLE>
<iframe frameborder="0" scrolling="no" width="100%" height="280" src="/Module/Includes/Weather.asp?BeginCity=<%=Request.QueryString["EndCity"]%>"></iframe>
<!-- 左侧查询 --></DIV>
<DIV class="DivDetailRight"><!-- 查询结果 -->
<TABLE class="RightInfoTable" id="Table4" cellSpacing="0" cellPadding="0" align="center"
border="0">
<TR>
<TD><IMG src="/Flight/Files/Images/Search_6.gif" align="absMiddle">
</TD>
<TD rowSpan="2" align=right><IMG src="/Flight/Files/Images/Search_7.gif" align="absMiddle">
</TD>
</TR>
<TR>
<TD>
<asp:label id="LabCityInfo" runat="server" EnableViewState="False" CssClass="FlightCityInfo"></asp:label></TD>
</TR>
</TABLE>
<TABLE class="RightInfoTable" id="Table5" cellSpacing="0" cellPadding="0" align="center"
border="0">
<TR height=30>
<TD class="FlightInfoTd"><FONT class="FlightInfoText">请您选择航班&nbsp;&nbsp;</FONT>
<asp:label id="LabDateInfo" runat="server" CssClass="FlightDayInfo"></asp:label>&nbsp;&nbsp;
<asp:Label id="LabFlightInfo" runat="server" EnableViewState="False" CssClass="FlightInfo"></asp:Label></TD>
</TR>
</TABLE>
<TABLE class="RightInfoTable" id="Table5" cellSpacing="0" cellPadding="0" align="center"
border="0">
<TR>
<TD class="FlightInfoTd">
<PUB:WeekList id="WeekList1" RUNAT="SERVER"></PUB:WeekList>
</TD>
</TR>
</TABLE>
<TABLE class="RightInfoTable" id="Table6" cellSpacing="0" cellPadding="4" align="center"
border="0">
<TR>
<TD align="left" width="60%"><FONT color="#000000">排序方式:</FONT>
<asp:radiobuttonlist id="RadSort" runat="server" Width="270px" RepeatColumns="5" RepeatLayout="Flow"
RepeatDirection="Horizontal" AutoPostBack="True">
<asp:ListItem Value="1">起飞时间</asp:ListItem>
<asp:ListItem Value="2">价格</asp:ListItem>
<asp:ListItem Value="3">到达时间</asp:ListItem>
<asp:ListItem Value="4">航空公司</asp:ListItem>
</asp:radiobuttonlist></TD>
<TD align="right">
<asp:HyperLink id="LinkPrev2" runat="server">
<img src="/Flight/Files/Images/Search_8.gif" border="0" align="absmiddle"></asp:HyperLink>
<asp:HyperLink id="LinkNext2" runat="server">
<img src="/Flight/Files/Images/Search_9.gif" border="0" align="absmiddle"></asp:HyperLink></TD>
</TR>
</TABLE>
<asp:label id="LabResult" runat="server" EnableViewState="False"></asp:label><br> <!-- 查询结果 --></DIV>
</DIV>
</form>
</center>
<!--#include Virtual="/Module/Includes/Bottom.asp" -->
</body>
</HTML>

解决方案 »

  1.   

    你试着把页面内容全剪切掉,只留下标签,再随便写一句话,看会不会显示,如果还是不显示,那就看下页面的开头啊、标签啊什么是不是有错,(或许你在copy什么东西的时候忘改一些小细节了),如果显示出来了,再把剪切的那些重新粘上,重新找原因看看,替你着急啊!
      

  2.   

    写一个纯html页面不加任何样式,测试下看能否正常显示,可以可能是样式里设置了不可见,不可以...
      

  3.   


    把所有的<!-- -->这种注视删了试试html标准的问题吧
      

  4.   

    右键空白页面,查看源码,然后贴出来<HTML>
        <HEAD>
    你没有任何XHTML文档声明的情况下使用了大写的标记,从根本上就返回了HTML标准
    你查看下CSDN见面的源码,看下最顶上那行
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">你再看看你的
      

  5.   

    返回了HTML标准
    =>
    违反了HTML标准