When I am using the Sitepoint "Build your own ASP.NET 3.5 Website book (in VB.Net) I am creating new pages and typing out the examples. When I do this the first line looks like:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Arrays.aspx.vb" Inherits="Arrays" %>
and nothing displays, when I change it to
<%@ Page Language="VB" %>
it works. What is the reason or shall I keep changing the code and come back to it at the end of the book>
Full code:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Arrays.aspx.vb" Inherits="Arrays" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Array data -->
<script runat="server">
Sub Page_load()
Dim drinkList(4) As String
drinkList(0) = "Water"
drinkList(1) = "Juice"
drinkList(2) = "Soda"
drinkList(3) = "Milk"
drinkLabel.Text = drinkList(1)
End Sub
</script>
<!-- End of Array Data -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<!--Create label for data to show in -->
<asp:Label ID="drinkLabel" runat="server" />
</div>
</form>
</body>
</html>