public class add_articleto
public System.Web.UI.WebControls.Label Label1;{
public void Page_Load(Object src , EventArgs e)
{
Label1.Text = "Hello World";
}}
==========================》》
public class add_articleto
{
public System.Web.UI.WebControls.Label Label1;
public void Page_Load(Object src , EventArgs e)
{
Label1.Text = "Hello World";
}
}
public System.Web.UI.WebControls.Label Label1;{
public void Page_Load(Object src , EventArgs e)
{
Label1.Text = "Hello World";
}}
==========================》》
public class add_articleto
{
public System.Web.UI.WebControls.Label Label1;
public void Page_Load(Object src , EventArgs e)
{
Label1.Text = "Hello World";
}
}
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: 'kuangren.add_articleto' is not a valid base class because it does not extend class 'System.Web.UI.Page'.Source Error:
Line 1: <%@ Page language="c#" src="1.aspx.cs" validateRequest="false" AutoEventWireup="false" Inherits="kuangren.add_articleto" %>
Line 2: <html>
Line 3: <head>
public class add_articleto:System.Web.UI.Page
不过还有个问题是 为什么要在类后面加上继承于PAGE类 看一些别人的CS 都没有这个啊??public class add_articleto:System.Web.UI.Page
{ public System.Web.UI.WebControls.Label Label1;
public void Page_Load(Object src , EventArgs e)
{
Label1.Text = "Hello World";
}
}
<form runat="server">
<asp:Label id="Label1" runat="server" />
</form>
ASPX文件 没包错 但LABEL 没有显示HELLO WORLD????