主题:求助:问个简单问题
本人刚开始学asp.net,遇到个小问题
代码如下:
<%@ Page language="c#" Codebehind="LinkButton.aspx.cs" AutoEventWireup="false" Inherits="LinkButton.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language=C# runat=server>
void Linkbutton1_Click(Object sender,EventArgs e)
{
Label2.Text="您点击了Link Button按钮";
}
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:Label id="Label1" style="Z-INDEX: 101; LEFT: 416px; POSITION: absolute; TOP: 80px" runat="server">LinkButton控件实例</asp:Label>
<asp:LinkButton id="LinkButton1" style="Z-INDEX: 102; LEFT: 384px; POSITION: absolute; TOP: 144px" runat="server" Width="40px" OnClick="Linkbutton1_Click">点 击</asp:LinkButton>
<asp:Label id="Label2" style="Z-INDEX: 103; LEFT: 496px; POSITION: absolute; TOP: 144px" runat="server"></asp:Label>
</form>
</body>
</HTML>
开始执行的时候显示错误为:
编译错误
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。
编译器错误信息: CS0234: 类型或命名空间名称“Global”在类或命名空间“System.Web.UI.WebControls.LinkButton”中不存在(是否缺少程序集引用?)
源错误:
行 26:
行 27: [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
行 28: public class Global_asax : LinkButton.Global {
行 29:
行 30: private static bool __initialized = false;
源文件: c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\linkbutton\ebe94285\a43fa7a7\fig2zojz.0.cs 行: 28
哪位大侠解决一下
拜托!!!
代码如下:
<%@ Page language="c#" Codebehind="LinkButton.aspx.cs" AutoEventWireup="false" Inherits="LinkButton.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<script language=C# runat=server>
void Linkbutton1_Click(Object sender,EventArgs e)
{
Label2.Text="您点击了Link Button按钮";
}
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:Label id="Label1" style="Z-INDEX: 101; LEFT: 416px; POSITION: absolute; TOP: 80px" runat="server">LinkButton控件实例</asp:Label>
<asp:LinkButton id="LinkButton1" style="Z-INDEX: 102; LEFT: 384px; POSITION: absolute; TOP: 144px" runat="server" Width="40px" OnClick="Linkbutton1_Click">点 击</asp:LinkButton>
<asp:Label id="Label2" style="Z-INDEX: 103; LEFT: 496px; POSITION: absolute; TOP: 144px" runat="server"></asp:Label>
</form>
</body>
</HTML>
开始执行的时候显示错误为:
编译错误
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。
编译器错误信息: CS0234: 类型或命名空间名称“Global”在类或命名空间“System.Web.UI.WebControls.LinkButton”中不存在(是否缺少程序集引用?)
源错误:
行 26:
行 27: [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
行 28: public class Global_asax : LinkButton.Global {
行 29:
行 30: private static bool __initialized = false;
源文件: c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\linkbutton\ebe94285\a43fa7a7\fig2zojz.0.cs 行: 28
哪位大侠解决一下
拜托!!!