c# asp.net“服务器标记格式不正确”
本文关键字:格式 不正确 服务器 asp net | 更新日期: 2023-09-27 18:35:29
我正在创建一个 asp.net 网站,我想在其中显示按钮单击时的水晶报告,我的默认值中出现错误.aspx即"创建 Control-asp:按钮时出错 服务器标记格式不正确"
完整的代码是:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="Show Report"OnClick="Button1_Click" />
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" />
</div>
</form>
</body>
</html>
任何帮助将不胜感激!
<asp:Button ID="Button1" runat="server" Text="Show Report"OnClick="Button1_Click" />
应该是
<asp:Button ID="Button1" runat="server" Text="Show Report" OnClick="Button1_Click" />
更改以下内容
<asp:Button ID="Button1" runat="server" Text="Show Report"OnClick="Button1_Click" />
对此
<asp:Button ID="Button1" runat="server" Text="Show Report" OnClick="Button1_Click" />