here is the code, it is right out of the book, and i still cannot view it with my web browser.
I get this error.
Server Error in '/' Application.
--------------------------------------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Source Error:
Line 23: "Forms", "Passport" and "None"
Line 24: -->
Line 25: <authentication mode="Windows" />
Line 26:
Line 27:
Source File: c:\inetpub\wwwroot\Ch09WebHello\web.config Line: 25
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
----------------------------------------------------------------------------
**********HERE IS THE CODE*************************
'Description: Display the user name concatenated to a label.
' This is the step-by-step program for creating
' Web Forms.
Public Class WebForm1
Inherits System.Web.UI.Page
Protected WithEvents txtName As System.Web.UI.WebControls.TextBox
Protected WithEvents btnSubmit As System.Web.UI.WebControls.Button
Protected WithEvents lblMessage As System.Web.UI.WebControls.Label
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
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
End Sub
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
'Display the name in the label
lblMessage.Text = "Hello " & txtName.Text
End Sub
End Class