1、看看button和listbox空间是否在<form></form>标记内2、是否有<runat = server>

解决方案 »

  1.   

    我是在.Net IDE下写的网页,代码是自动生成的,是不是IIS或是其它环境的配置问题,请指点。急!!!!代码如下:
    <%@ Page language="c#" Codebehind="WebForm2.aspx.cs" AutoEventWireup="false" Inherits="WebApp12.WebForm2" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML>
    <HEAD>
    <title>WebForm2</title>
    <meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
    <meta name="CODE_LANGUAGE" Content="C#">
    <meta name="vs_defaultClientScript" content="JavaScript">
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
    </HEAD>
    <body MS_POSITIONING="GridLayout">
    <form id="WebForm2" method="post" runat="server">
    <FONT face="宋体">
    <asp:Label id="Label1" style="Z-INDEX: 101; LEFT: 183px; POSITION: absolute; TOP: 66px" runat="server" Width="177px" Height="36px">Label</asp:Label>
    <asp:Button id="Button1" style="Z-INDEX: 102; LEFT: 178px; POSITION: absolute; TOP: 153px" runat="server" Width="203px" Height="60px" Text="Button"></asp:Button></FONT>
    </form>
    </body>
    </HTML>
      

  2.   

    <asp:Button id="Button1" style="Z-INDEX: 102; LEFT: 178px; POSITION: absolute; TOP: 153px" runat="server" Width="203px" Height="60px" Text="Button"></asp:Button>
    ==》
    <asp:Button id="Button1" runat="server" Text="Button"></asp:Button>