PDA

View Full Version : Getting nowhere !!! - help


steveg
04-10-2003, 11:06 AM
Right I started looking at ASP.net yesterday and to be honest I can't get it to do anything.

I have followed the instructions in a book to the letter and nothing is working.

below is a small piece of code that should just display a button and a label in the browser, however, when I run the code all I get is a blank window in the browser with "label" in the top left hand corner. with no sign of the button anywhere.

I've just found a small test project that I did a couple of months ago when I first installed .net and that is doing the same thing with a textbox (not displaying it, thats probably why I never bothered carrying on with it as I couldn't get it to work properly).

Any idea's, to me it looks like a setting somewhere is not set properly but I can't see anything wrong.

Thanks

Steve.

**************************************************

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="dotnet2.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:Button id="Button1" style="Z-INDEX: 101; LEFT: 56px; POSITION: absolute; TOP: 72px" runat="server" Text="Button" Width="88px" Height="40px"></asp:Button>
<asp:Label id="Label1" style="Z-INDEX: 102; LEFT: 40px; POSITION: absolute; TOP: 16px" runat="server" Height="24px" Width="152px">Label</asp:Label>
</form>
</body>
</HTML>

david7777
04-10-2003, 12:21 PM
If you run the code that you gave, without the code behind settings, then all seems to show properly...


<%@ Page Language="vb" AutoEventWireup="false" %>


So the problem is in your server side code.

steveg
04-10-2003, 03:31 PM
OK the problem was this,

I install IIS after I had installed the .net framework and so IIS was not registered properly.

I needed to run

C:\windows\Microsoft.NET\Framework\v1.0.3705\aspnet_regiis.exe -u

to uninstall the iis bit then run

C:\windows\Microsoft.NET\Framework\v1.0.3705\aspnet_regiis.exe -i

to reinstall it.

Then things started working properly, 2 days work down the pan because of that, they could of made it clearer.

Thanks for your help

Steve. :)