473,799 Members | 2,999 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

First asp.net error. Pl help

I get the following error. Please help

c:\inetpub\wwwr oot\WebApplicat ion1\WebForm2.a spx(6,38): error CS1001:
Identifier expected
c:\inetpub\wwwr oot\WebApplicat ion1\WebForm2.a spx(6,52): error CS1002:
; expected
c:\inetpub\wwwr oot\WebApplicat ion1\WebForm2.a spx(7,19): error CS1519:
Invalid token '(' in class, struct, or interface member declaration
c:\inetpub\wwwr oot\WebApplicat ion1\WebForm2.a spx(9,2): error CS0116: A
namespace does not directly contain members such as fields or methods
c:\WINNT\Micros oft.NET\Framewo rk\v1.1.4322\Te mporary ASP.NET
Files\webapplic ation1\8dd84b00 \b065eec7\lohcc sx9.0.cs(69,16) : error
CS1518: Expected class, delegate, enum, interface, or struct
c:\WINNT\Micros oft.NET\Framewo rk\v1.1.4322\Te mporary ASP.NET
Files\webapplic ation1\8dd84b00 \b065eec7\lohcc sx9.0.cs(93,25) : error
CS1518: Expected class, delegate, enum, interface, or struct
c:\WINNT\Micros oft.NET\Framewo rk\v1.1.4322\Te mporary ASP.NET
Files\webapplic ation1\8dd84b00 \b065eec7\lohcc sx9.0.cs(173,25 ): error
CS1518: Expected class, delegate, enum, interface, or struct
c:\WINNT\Micros oft.NET\Framewo rk\v1.1.4322\Te mporary ASP.NET
Files\webapplic ation1\8dd84b00 \b065eec7\lohcc sx9.0.cs(177,1) : error
CS1022: Type or namespace definition, or end-of-file expected

<%@ Page language="c#" Codebehind="Web Form2.aspx.cs"
AutoEventWireup ="false" Inherits="WebAp plication1.WebF orm2" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >

<html>
<head><script runat=server>
protected void WebForm2_Load(O bject 0, EventArgs e){
Response.Write( "Message from Load Event Handler <br>");
}
protected void WebForm2_Init(O bject 0, EventArgs e){
Response.Write( "Message from Init Event Handler <br>");
}

protected void WebForm2_PreRen der(Object 0,EventArgs e){
Response.Write( "Message from PreRender Event Handler <br>");
}

protected override void OnInit(EventArg s e){
this.load new EventHander(Web Form2_Load);
this.load new EventHander(Web Form2_Init);
this.load new EventHander(Web Form2_Render);
base.OnInit(e);

}
</script>

<title>WebForm2 </title>
<meta name="GENERATOR " Content="Micros oft Visual Studio .NET 7.1">
<meta name="CODE_LANG UAGE" Content="C#">
<meta name=vs_default ClientScript content="JavaSc ript">
<meta name=vs_targetS chema
content="http://schemas.microso ft.com/intellisense/ie5">
</head>
<body MS_POSITIONING= "GridLayout ">

<form id="Form1" method="post" runat="server">


</form>

</body>
</html>
Nov 18 '05 #1
1 2295
<%@ Page language="c#" Codebehind="Web Form2.aspx.cs"
AutoEventWireu p="false" Inherits="WebAp plication1.WebF orm2" %>

+ where is your code behind - >WebForm2.aspx. cs ??? I
cannot found it here. Check again syntax in your code
behind files

+ if you are not gonna use code behind (instead of using
visual tools, you like to just hands in on Notepad, then
it should be like this) :

-- delete this lines --<%@ Page language="c#" Codebehind="Web Form2.aspx.cs"
AutoEventWireu p="false" Inherits="WebAp plication1.WebF orm2" %>
---------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head><script runat=server>
--change to this ------------------------------------------
<head><script language="cs" runat=server>
protected void WebForm2_Load(O bject 0, EventArgs e){
Response.Write( "Message from Load Event Handler <br>"); }
protected void WebForm2_Init(O bject 0, EventArgs e){
Response.Write( "Message from Init Event Handler <br>"); }

protected void WebForm2_PreRen der(Object 0,EventArgs e){
Response.Write( "Message from PreRender Event Handler <br>"); }

protected override void OnInit(EventArg s e){
this.load new EventHander(Web Form2_Load);
this.load new EventHander(Web Form2_Init);
this.load new EventHander(Web Form2_Render);
base.OnInit(e) ;

}
</script>
Hope this helps :)

Jody Ananda
MCAD.NET,MCSD.N ET
"All programs are poems, it just not all programmers are
poets."

-----Original Message-----
I get the following error. Please help

c:\inetpub\www root\WebApplica tion1\WebForm2. aspx(6,38): error CS1001:Identifier expected
c:\inetpub\www root\WebApplica tion1\WebForm2. aspx(6,52): error CS1002:; expected
c:\inetpub\www root\WebApplica tion1\WebForm2. aspx(7,19): error CS1519:Invalid token '(' in class, struct, or interface member declarationc:\inetpub\www root\WebApplica tion1\WebForm2. aspx(9,2): error CS0116: Anamespace does not directly contain members such as fields or methodsc:\WINNT\Micro soft.NET\Framew ork\v1.1.4322\T emporary ASP.NETFiles\webappli cation1\8dd84b0 0\b065eec7\lohc csx9.0.cs (69,16): errorCS1518: Expected class, delegate, enum, interface, or structc:\WINNT\Micro soft.NET\Framew ork\v1.1.4322\T emporary ASP.NETFiles\webappli cation1\8dd84b0 0\b065eec7\lohc csx9.0.cs (93,25): errorCS1518: Expected class, delegate, enum, interface, or structc:\WINNT\Micro soft.NET\Framew ork\v1.1.4322\T emporary ASP.NETFiles\webappli cation1\8dd84b0 0\b065eec7\lohc csx9.0.cs (173,25): errorCS1518: Expected class, delegate, enum, interface, or structc:\WINNT\Micro soft.NET\Framew ork\v1.1.4322\T emporary ASP.NETFiles\webappli cation1\8dd84b0 0\b065eec7\lohc csx9.0.cs (177,1): errorCS1022: Type or namespace definition, or end-of-file expected


<%@ Page language="c#" Codebehind="Web Form2.aspx.cs"
AutoEventWireu p="false" Inherits="WebAp plication1.WebF orm2" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head><script runat=server>
protected void WebForm2_Load(O bject 0, EventArgs e){
Response.Write( "Message from Load Event Handler <br>"); }
protected void WebForm2_Init(O bject 0, EventArgs e){
Response.Write( "Message from Init Event Handler <br>"); }

protected void WebForm2_PreRen der(Object 0,EventArgs e){
Response.Write( "Message from PreRender Event Handler <br>"); }

protected override void OnInit(EventArg s e){
this.load new EventHander(Web Form2_Load);
this.load new EventHander(Web Form2_Init);
this.load new EventHander(Web Form2_Render);
base.OnInit(e) ;

}
</script>

<title>WebForm2 </title>
<meta name="GENERATOR " Content="Micros oft Visual Studio .NET 7.1"> <meta name="CODE_LANG UAGE" Content="C#">
<meta name=vs_default ClientScript content="JavaSc ript"> <meta name=vs_targetS chema
content="htt p://schemas.microso ft.com/intellisense/ie5">
</head>
<body MS_POSITIONING= "GridLayout ">

<form id="Form1" method="post" runat="server">


</form>

</body>
</html>
.

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
7300
by: Rene | last post by:
Hi, I'm spend many hour to fix this problem, read many articles about it but no article gave a solution. To isolate the problem I've created in IIS6 (WServer2003) a virtual directory test to the local C:\test, in this directory I have index.htm and test.asp (just a simple Response.Write "TEST"). Opening the server/test/index.htm show the page, server/test/test.asp gives
15
8289
by: Rob Nicholson | last post by:
I'm starting to worry a bit now. We're getting the above error when two users hit the same database/page on an ASP.NET application using ADO.NET, talking to a SQL 7 server. The error is perfectly repeatable :-( But this should help! The error is occurring inside ExecuteReader which uses a DataReader internally. Here are some things that I'm pretty sure it's *NOT*:
4
22961
by: Peter Rothenbuecher | last post by:
Hello, when I try to compile the following code: /* This fragment of code is taken from an online tutorial */ #include<stdio.h> #include<fcntl.h> #include<stdlib.h> float bigbuff;
6
9893
by: Peter Rothenbuecher | last post by:
Hello, when I try to compile the following code with g++ -o client client.c #include<sys/socket.h> #include<stdio.h> #include<stdlib.h> #define ADDRESS "mysocket"; #define MAXLEN 200;
8
1325
by: y1799 | last post by:
I have a problem with creating new Web project I use Win XP pro. I installed VS 2003 and after installation ran "aspnet_regiis.exe /i " I got error message: "The web server reported the following error when attemping to create or open the Web project located at the following URL; "http://localhost/WebApplication1'.'HTTP/1.1.500 Server Error' The button "help" opened for me such page:...
0
2185
by: Christopher H. Laco | last post by:
I'm in a strange situation. I have a dataset that uses it own connection string from MySettings. All is well. This thing works in .NET just dandy. If I reference this dataset from another project, and load that project under IIS6/ASP/2003 using COM, it fails with the folowing error on the FIRST request only: > Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. at...
4
2392
by: News | last post by:
Hi Everyone, The attached code creates client connections to websphere queue managers and then processes an inquiry against them. The program functions when it gets options from the command line. It also works when pulling the options from a file.
6
3375
by: alho | last post by:
The web service is called by a program running on pocket pc. When to call the web service, the first call is still ok, but for the second or later calls, it will throw "403 Forbidden" WebException. When to test it using the web interface on pocket IE, everything is fine. Before there was no such problem, it only happened within a week or so. I suspect it's caused by the server's firewall settings, but how come the first call is ok? This...
6
6267
by: Doug Ferguson | last post by:
I am using a webservice client that was created from a WSDL file in .Net 1.1. The client ALWAYS works the first time I call it. The second call returns one of two exceptions. It either returns the error: A) The connection has been closed on a receive : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
0
1728
by: Eric von Horst | last post by:
Hi, we have a third-party product that has a C++ api on HP-UX. I would like be able to use the API in Python (as I remember Python is good at doing this). I have no experience with this so I Googled and tried to find some info on what I had to do.
0
9688
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10491
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10268
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10247
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7571
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6809
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4146
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.