.Net problem

Steadoriare

New Member
Just getting into the .Net world, and having issues running it on my server. I have everything installed and running it seems. I can take a normal html file and re-name it with the .aspx extention and it runs.<BR><BR>But when I try and run a sample page. It gives me an runtime error.<BR><BR>I'm using Matrix to code the samples, and it runs fine with the server that comes with it.<BR><BR>but heres the sample page:<BR><BR><%@ Page Language="vb" %><BR><script runat="server"><BR><BR> Sub EnterBtn_Click(Sender As Object, E As EventArgs)<BR> Message.Text = "Hi " & Name.Text & ", welcome to ASP.NET!"<BR> End Sub<BR><BR></script><BR><html><BR><head><BR></head><BR><body><BR> <h3><font face="Verdana">Handling Control Action Events</font> <BR> </h3><BR> <p><BR> This sample demonstrates how to access a <asp:textbox> server control within<BR> the "Click" event of a <asp:button>, and use its content to modify the text<BR> of a <asp:label>. <BR> </p><BR> <p><BR> <hr /><BR> </p><BR> <p><BR> </p><BR> <form action="controls3.aspx" runat="server"><BR> <font face="Verdana">Please enter your name: <BR> <asp:textbox id="Name" runat="server"></asp:textbox><BR> <asp:button id="Button1" onclick="EnterBtn_Click" runat="server" text="Enter"></asp:button><BR> <p><BR> <asp:label id="Message" runat="server"></asp:label><BR> </p><BR> </font><BR> </form><BR></body><BR></html><BR><BR><BR>The error comes on line 3 --(Sub EnterBtn_Click)--<BR><BR>Also, if I remove that Sub, the page displays but the <asp:> form parts dont show up on the page either. When I view source I just see it as html..<BR><BR>Any idea when running it in IIS it would do this?<BR><BR>ThanksI copied and pasted your code into a page and it works fine.<BR>Please Post the error.<BR><BR>Aaron&nbsp;<BR>Acuall I changed the following:<BR><%@ Page Language="vb" %><BR><script runat="server"><BR><BR>to:<BR><script Language="vb" runat="server"><BR><BR>and moved it into the <head> portion and that removed the error. What is happening is all the server side code shows up when I view sorce.<BR><BR>What is happening I think is that I dont have the .Net framework installed corectly. So, I installed Visual Basic.Net in hopes that that would fix the problem. It did not =(<BR><BR>I sill get the same thing. I tried to re-install the .Net SDK and it says it's already installed. No clue whats going on here.<BR><BR>I'm running Windows XP Profesional Ver. 2002I had to un-install and re-install the .Net Framwork about 3 times but finally got it working correctly.<BR><BR>Just so no one wastes time on this =)
 
Back
Top