You need to tell it that it is an ASPX page with the @Page directive. I also
added a line to change the displayed text.
Compilation is not required unless you are using code behind. It will
compile automatically if you also add the Src= attribute.
<%@ Page Language="vb" AutoEventWireup="true" %>
<html>
<script runat="server">
Sub Page_Load
link1.href="http://www.w3schools.com"
link1.innerText = "W3 School"
End Sub
</script>
<body>
<form runat="server" id="Form1">
<a id="link1" runat="server">ABCDEF</a></form>
</body>
</html>
"Connie Edwards" <an*******@discussions.microsoft.com> wrote in message
news:30**********************************@microsof t.com...
The following page.aspx is a very simple sample. But when I try to load
it, it just prints 'ABCDED' as against making it a link. So, I was wondering
if this file will first need to be compiled before being used. And if it
needs to be compiled, how to do it? I have only .NET framework SDK. Don't
have Visual Studio.NET yet.
Thanks in advance for any help.
<script runat="server">
Sub Page_Load
link1.HRef="http://www.w3schools.com"
End Sub
</script><html><body><form runat="server"><a id="link1"
runat="server">ABCDEF</a></form></body></html>