M
MicroKarL
Everyone..
I have a really simple program using code behind. but I just keep
getting the error saying my Label is not decleared...
test.aspx:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm3.aspx.vb"
Inherits="WebTest.WebForm3"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm3</title>
</HEAD>
<body MS_POSITIONING="GridLayout">
<asp:Label ID="Message" Runat="server" />
</body>
</HTML>
test.aspx.vb:
Imports System
Imports System.Web.UI
Imports System.Web.UI.WebControls
Public Class WebForm3
Inherits System.Web.UI.Page
Protected WithEvents Message As System.Web.UI.WebControls.Label
#Region " Web Form Designer Generated Code "
.....
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Message.Text = "Hello, World.."
End Sub
End Class
The error message is "Message" is not decleared.. but Message is in the aspx
page as a Label, I really don't understand why it says "Message" is not
decleared.. Can someone tell me...
Carl
I have a really simple program using code behind. but I just keep
getting the error saying my Label is not decleared...
test.aspx:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm3.aspx.vb"
Inherits="WebTest.WebForm3"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm3</title>
</HEAD>
<body MS_POSITIONING="GridLayout">
<asp:Label ID="Message" Runat="server" />
</body>
</HTML>
test.aspx.vb:
Imports System
Imports System.Web.UI
Imports System.Web.UI.WebControls
Public Class WebForm3
Inherits System.Web.UI.Page
Protected WithEvents Message As System.Web.UI.WebControls.Label
#Region " Web Form Designer Generated Code "
.....
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Message.Text = "Hello, World.."
End Sub
End Class
The error message is "Message" is not decleared.. but Message is in the aspx
page as a Label, I really don't understand why it says "Message" is not
decleared.. Can someone tell me...
Carl