I am using a recommended book on ASP.NET and already having problems with my
first example..here is the code:
<%@ Page Language="VB" %>
sub Page_Load(obj as object, e as eventargs)
lblMessage.Text = "Welcome to ASP.NET!"
<asp:Label id="lblMessage" runat="server"/>
when I try to view it on a web page, I get an error:
Error: Expected ';'
Looks like you are missing the closing tag for the asp label.
<asp:Label id="lblMessage" runat="server">
You should never receive a "Expected ';' in VB.
My guess is your solution or project is set to C# Web Application. Check your configuration.
In C#, the line -- lblMessage.Text = "Welcome to ASP.NET!" -- would error out because it is missing it's end of statement character... ;
Hope this helps.
Zath -- He does escape the label correctly with the / before the closing tag. If it is not a collection of items, this escape sequence is allowed.
Happy Friday to all.