日期:2014-05-17  浏览次数:20496 次

下面显示服务器标记错误怎么解决
<%@ Page Language="VB" %>

<!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">
<head runat="server">
  <title>无标题页</title>
</head>
<body>
  <form id="form1" runat ="server"><div>用户名:<asp:textbox ID="textbox1"runat="server"></asp:textbox></div></form>
</body>
</html>


------解决方案--------------------
<asp:TextBox/> 注意大小写

C# code

<%@ Page Language="VB" %>

<!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">
<head runat="server">
  <title>无标题页</title>
</head>
<body>
   <form id="form1" runat ="server">
      <div>
            用户名:<asp:TextBox ID="textbox1" runat="server"></asp:TextBox>
      </div>
   </form>
</body>
</html>