在vistual studio2010新建一个ASP.NET网站时.在默认页面输入html代码时提示服务器标示的格式不正确、

在vistual studio2010新建一个ASP.NET网站时.在默认页面输入html代码时提示服务器标示的格式不正确、,第1张

其实都是小问题,你在写代码的时候要注意中英文的切换,改空的地方要空,你的标记错误的原因是因为你没有空格(你懂的哈)剩下的就是你在引用了模板页之后的子页的写法下代码。将<body>标签里面的代码写到下面代码的<p>代码中即可。下次写代码的时候改成拆分模式就容易些,空间能拖就拖。
将你的整张页码代码改成下面的就可以了。
<%@ Page title="主页" Language="C#" MasterPageFile="~/Sitemaster" AutoEventWireup="true"
CodeFile="StudentManageraspxcs" Inherits="_Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<p>
<form id ="form1"runat="server">
<div>
<table>
<tr>
<td colspan ="3"style="height:55px">
<asp:Label ID ="Label1" runat ="server" BorderColor ="#FFFFC0" Font-Bold="true" Font-Size="XX-Large"
Font-Underline="true" ForeColor ="Blue" Height ="55px" Text="学生信息管理" Width="389px"></asp:Label>

</td>
</tr>
<tr>
<td style ="width :44px;height:160px">
<asp:TextBox ID ="Textbox2" runat="server" Height ="147px" TextMode="MultiLine" Width ="192px" Forecolor="MidnightBlue">说明:

1、选择上下按钮可以改变学生信息的排列信息;
2、选择“编辑”按钮可以改变你所选择的学生信息;
3、选择“删除”按钮可以删除你所选择的学生信息;
4、选择“添加”按钮可以添加你要添加的学生信息;
</asp:TextBox> </td>
<td style ="width :85px;height:160px "valign="top">
<asp:ListBox ID="StudentList" runat="server"></asp:ListBox></td>
<td style ="width :78px;height:160px">
<asp:Button ID="deleteBtn" runat="server" onclick="deleteBtn_Click"
style="margin-top: 0px" Text="删除" />
<asp:Button ID="editBtn" runat="server" Text="编辑" OnClick="editBtn_Click" /><br/>
<asp:Button ID="AddBtn" runat="server" Text="添加" OnClick="AddBtn_Click" /><br/>
</tr>
<tr>
<td colspan ="3">
<asp:TextBox ID ="TextBox3" runat="server" Width ="484px"></asp:TextBox></td>
</tr>
</table>
</div>
</form>
</p>
</asp:Content>


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zz/10282389.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-07
下一篇2023-05-07

发表评论

登录后才能评论

评论列表(0条)

    保存