注册 登录
编程论坛 ASP.NET技术论坛

谁能告诉我这个问题该怎么解决?

watertree 发布于 2008-12-13 20:10, 728 次点击
我是个新手,用VS2005编调试,可是下面这段代码,红色部分提示服务器标记的格式不正确,自己找了半天也不知道出什么问题了,希望有人能告诉我!谢谢!
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.

<html xmlns="http://www. >
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Label ID="Label1" runat="server"style="position:absolute; left: 473px; top: 84px;" Text="Label" Height="27px" Width="167px"></asp:Label>
        <asp:Label ID="Label2" runat="server" style="position:absolute; left: 471px; top: 132px;"Text="Label" Height="22px" Width="166px"></asp:Label>
        <asp:Label ID="Label3" runat="server" style="position:absolute; left: 472px; top: 171px;"Text="Label" Height="23px" Width="165px"></asp:Label>
        <asp:TextBox ID="TextBox1" runat="server"style="position:absolute; left: 591px; top: 211px;"></asp:TextBox>
        <asp:Button ID="Button1" runat="server" style="position:absolute; left: 480px; top: 250px;"Text="Button" />
   </div>
    </form>
</body>
</html>
4 回复
#2
hui54007862008-12-13 20:30
你没空格了,
属性和属性之间必须要空格,不可以挨着写


<div>
        <asp:Label ID="Label1" runat="server" style="position:absolute; left: 473px; top: 84px;" Text="Label" Height="27px" Width="167px"></asp:Label>
        <asp:Label ID="Label2" runat="server" style="position:absolute; left: 471px; top: 132px;" Text="Label" Height="22px" Width="166px"></asp:Label>
        <asp:Label ID="Label3" runat="server" style="position:absolute; left: 472px; top: 171px;" Text="Label" Height="23px" Width="165px"></asp:Label>
        <asp:TextBox ID="TextBox1" runat="server" style="position:absolute; left: 591px; top: 211px;"></asp:TextBox>
        <asp:Button ID="Button1" runat="server" style="position:absolute; left: 480px; top: 250px;" Text="Button" />   </div>
#3
watertree2008-12-13 22:04
貌似还是不行!
#4
watertree2008-12-13 22:07
现在好了!谢谢!
1