samsmithnz Posted October 6, 2003 Posted October 6, 2003 I've used ASP before, but not ASP.NET, so this morning I tryed to see what I could whip up with this new product. My results have been disappointing. I'm sorry if this has been asked before, but I can't see a ASP.NET faq around here anywhere... Anyway, first I went to http://www.ASP.NET, seemed like the logical place to go, except they seem intent on ruining ASP.NET by putting all the server side script in the HTML, instead of using the aspx.vb file. So I've created a simple .NET dll that contains a class that contains a simple property that returns "Hello World" (cheesy I know). I've created a new ASP.NET project. Copied the Dll into the /BIN folder. Added a label and a textbox to the aspx file, and added this code to the page_load event: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here Dim objCustomer As CustomerDll.clsCustomer objCustomer = New CustomerDll.clsCustomer() txtName.Text = objCustomer.Name End Sub and heres the code for the Class (which you probably don't know, but just in case: Public Class clsCustomer Private strName As String Public Property Name() As String Get Name = strName End Get Set(ByVal Value As String) strName = Value End Set End Property Public Sub New() strName = "Hello World!" End Sub End Class And heres an attachment of what I see: But What do I see? I see the Name label, no textbox, no Hello World, my heading is in a weird place and theres no styles applied to what I see. Whats up? What did I forget? PS: I've also added to the screenshot to show what the design view of my ASP page looks like: thanks Sam Quote Thanks Sam http://www.samsmith.co.nz
samsmithnz Posted October 7, 2003 Author Posted October 7, 2003 No Ideas? No one can help me? What about a pointer to a tutorial to set up an ASP.NET project...?? Quote Thanks Sam http://www.samsmith.co.nz
Administrators PlausiblyDamp Posted October 7, 2003 Administrators Posted October 7, 2003 Does the web server have the .Net framework installed? If you open the page in IE and do a view source does the source contain lots of tags? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
samsmithnz Posted October 7, 2003 Author Posted October 7, 2003 this is what I see, looks like ASP to me: <%@ Import Namespace="CustomerDll.clsCustomer" %> <%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="Test.WebForm1"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <title>Test ASP.NET Document</title> <meta content="Microsoft Visual Studio.NET 7.0" name="GENERATOR"> <meta content="Visual Basic 7.0" name="CODE_LANGUAGE"> <meta content="JavaScript" name="vs_defaultClientScript"> <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema"> <style>DIV { BORDER-RIGHT: black 1px solid; PADDING-RIGHT: 10px; BORDER-TOP: black 1px solid; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; FONT: 8pt verdana; BORDER-LEFT: black 1px solid; PADDING-TOP: 10px; BORDER-BOTTOM: black 1px solid; BACKGROUND-COLOR: #cccccc } </style> </HEAD> <body text="black" MS_POSITIONING="GridLayout"> <form id="Form1" method="post" runat="server"> <asp:label id="Label1" style="Z-INDEX: 101; LEFT: 215px; POSITION: absolute; TOP: 72px" runat="server" Width="108px" Height="9px" Font-Names="Verdana" Font-Size="Medium">Name:</asp:label><asp:textbox id="txtName" style="Z-INDEX: 102; LEFT: 331px; POSITION: absolute; TOP: 68px" runat="server" Width="205px" Height="27px" Font-Names="Verdana" Font-Size="Medium"></asp:textbox> <asp:Label id="Label2" style="Z-INDEX: 103; LEFT: 217px; POSITION: absolute; TOP: 19px" runat="server" Width="299px" Height="29px" Font-Names="Verdana" Font-Size="Medium">Heading!!!</asp:Label></form> </body> </HTML> Quote Thanks Sam http://www.samsmith.co.nz
samsmithnz Posted October 7, 2003 Author Posted October 7, 2003 I had the web server, installed .NET, and removed the web server (long story), and then only just installed it again. Could the server extensions have been deleted when I uninstalled IIS? Quote Thanks Sam http://www.samsmith.co.nz
Administrators PlausiblyDamp Posted October 7, 2003 Administrators Posted October 7, 2003 Looks like the server doesn't have the framework installed (or it isn't registered properly) If you look on the webserver is there a folder \Microsoft.NET\Framework\ ? if so run the aspnet_regiis.exe /I utility from that folder - if not you will need to install the framework on the server. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
samsmithnz Posted October 7, 2003 Author Posted October 7, 2003 I definetly have the framework installed, it sounds like I'm going to have to pop in the disks and reinstall the server extensions to relink them to the web server... thanks for your help. Quote Thanks Sam http://www.samsmith.co.nz
DayWalker Posted October 8, 2003 Posted October 8, 2003 The problem is you need to install Internet Information Services before you install .Net. Try uninstalling .Net and IIS then adding IIS first. If you understand what i mean. Quote
samsmithnz Posted October 8, 2003 Author Posted October 8, 2003 I don't have time to uninstall .NET and then reinstall it. I simply don't have half a day to do this. I've tryed reinstalling the server components but nothing works yet. I might try a new ASP project and see how that goes... Quote Thanks Sam http://www.samsmith.co.nz
Administrators PlausiblyDamp Posted October 8, 2003 Administrators Posted October 8, 2003 did you try running the aspnet_regiis.exe /I command I suggested? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
samsmithnz Posted October 8, 2003 Author Posted October 8, 2003 OK I've run this, and it sits there for quite a while 'Start Installing ASP.NET (1.1.4322.0), and then finishes, and... it WORKS!!! Fantastic. thank you thank you thank you! Quote Thanks Sam http://www.samsmith.co.nz
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.