Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 3rd, 2005, 10:31 AM
Registered User
 
Join Date: Aug 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Giri
Default Compilation error

Hi everyone,
              I am new to .net and new to this forum. I tried some exercise using vb.net in asp.net. Here is the source code and error. Can ayone help me to pointout what I did wrong? Thanks in advance.
Source code:
<%@ Page Language="vb" runat="server"%>
<HTML>
    <HEAD>
        <title>Hello ASP.NET</title>
        <script language="vb" runat="server">
    Text.Text="Hello ASP.NET! Welcome to Dotnet World!">
        </script>
    </HEAD>
    <body>
        <P>&nbsp;</P>
    </body>
</HTML>

Error:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30188: Declaration expected.

Source Error:



Line 4: ' Runtime Version: 1.1.4322.2032
Line 5: '
Line 6: ' Changes to this file may cause incorrect behavior and will be lost if
Line 7: ' the code is regenerated.
Line 8: ' </autogenerated>


Source File: http://localhost/dotnet/hello asp.net/WebForm1.aspx Line: 6


 
Old August 3rd, 2005, 10:58 AM
Authorized User
 
Join Date: Nov 2004
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try removing the ">" at the end of "World!">"

 
Old August 3rd, 2005, 12:27 PM
Registered User
 
Join Date: Aug 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Giri
Default

Mr.Busher,
           I tried by removing ">". I think error is not in that line. Its in server control line. That is in <asp:label id........./> line. Thanks.

 
Old August 3rd, 2005, 04:14 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

First of all, you say:

"That is in <asp:label id........./> line"

I don't see a label control anywhere in your code. I assume this is what you are calling "Text".

Second, you something like this:
------------------------------------------
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            label1.Text = "Hello ASP.NET! Welcome to Dotnet World!"
End Sub
------------------------------------------

instead of just this:

------------------------------------------
label1.Text = "Hello ASP.NET! Welcome to Dotnet World!"
------------------------------------------

"label1" is the name of the label control I used.

J





Similar Threads
Thread Thread Starter Forum Replies Last Post
Compilation Error furqanms Pro Java 2 September 28th, 2007 11:22 AM
compilation error pratik28 C# 1 September 24th, 2006 07:39 AM
Compilation Error allyant ASP.NET 2.0 Basics 1 August 5th, 2006 05:51 PM
compilation error luizou Classic ASP Components 1 February 10th, 2005 06:25 PM
compilation error saint Classic ASP Databases 2 June 23rd, 2003 04:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.