Hello everyone,
I keep getting the following compilation error: BC30456: 'Text' is not a member of 'System.Web.UI.HtmlControls.HtmlGenericControl'.
Here is my code. The error occurs on line 13:
<script language="
vb" runat="server">
Sub Page_Load()
Dim CapitalCityofUK As String
Dim NumberOfStates As Integer
Dim IndependenceDay As Date
CapitalCityofUk = "London"
NumberOfStates = 50
IndependenceDay = #7/4/1776#
lblCapital.Text = CapitalCityofUK
lblNumStates.Text = NumberOfStates
lblDateIndependece.Text = IndependenceDay
End Sub
</script>
<html>
<head>
<title>Creating Variable Examples</title>
</head>
<body>
The contents of CapitalCityofUk is:
<asp:label id="lblCapital" runat="server" />
<br>The contents of NumberOfStates is:
<asp.label id="lblNumStates" runat="server" />
<br>The Contents of IndependenceDay is:
<asp:label id="DateIndependence" runat="server" />
</body>
</html>
Any help would be appreciated - I'm copying it straight out of the book and just can't figure out what I'm doing wrong.
Thanks!
Barry