need some help

F

Franko

I get the following error. please help

Server Error in '/WebApplication1' Application.
--------------------------------------------------------------------------------

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: CS1001: Identifier expected

Source Error:



Line 4: <html>
Line 5: <head><script runat=server>
Line 6: protected void WebForm2_Load(Object 0, EventArgs e){
Line 7: Response.Write("Message from Load Event Handler <br>");
Line 8: }


Source File: c:\inetpub\wwwroot\WebApplication1\WebForm2.aspx Line:
6



The source is as follows

<%@ Page language="c#" Codebehind="WebForm2.aspx.cs"
AutoEventWireup="false" Inherits="WebApplication1.WebForm2" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >

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

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

protected override void OnInit(EventArgs e){
this.load new EventHander(WebForm2_Load);
this.load new EventHander(WebForm2_Init);
this.load new EventHander(WebForm2_Render);
base.OnInit(e);

}
</script>

<title>WebForm2</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<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">




</form>

</body>
</html>
 
A

Alvin Bruney

Object 0 in line 6 should be Object sender or some variable name. 0 is not a
valid variable name
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top