HighTechTalks DotNet Forums  

Method not found: Void System.EventHandler..ctor(System.Object, IntPtr).

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss Method not found: Void System.EventHandler..ctor(System.Object, IntPtr). in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
zee
 
Posts: n/a

Default Method not found: Void System.EventHandler..ctor(System.Object, IntPtr). - 07-17-2003 , 08:57 AM






Hi!
While trying to run my first web application using
Microsost Visual Studio .net I came up with the following
error:
Method not found: Void System.EventHandler..ctor
(System.Object, IntPtr).
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and where
it originated in the code.

Exception Details: System.MissingMethodException: Method
not found: Void System.EventHandler..ctor(System.Object,
IntPtr).

Source Error:


Line 32: // CODEGEN: This call is
required by the ASP.NET Web Form Designer.
Line 33: //
Line 34: InitializeComponent();
Line 35: base.OnInit(e);
Line 36: }

The application is meant to do the following: CLick a
buuton and a msg in a textbox appears (typical hello world
scenario) the problem is I dont know what is wrong the
code is attached below:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace HelloWorld
{
/// <summary>
/// Summary description for WebForm1.
/// </summary>
public class WebForm1 : System.Web.UI.Page
{
protected
System.Web.UI.WebControls.TextBox TextBox1;
protected System.Web.UI.WebControls.Label
Label1;
protected System.Web.UI.WebControls.Button
buthead;

private void Page_Load(object sender,
System.EventArgs e)
{
// Put user code to initialize the
page here
}

#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required
by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// Required method for Designer support -
do not modify
/// the contents of this method with the
code editor.
/// </summary>
private void InitializeComponent()
{
this.buthead.Click += new
System.EventHandler(this.buthead_Click);
this.Load += new
System.EventHandler(this.Page_Load);

}
#endregion

private void buthead_Click(object sender,
System.EventArgs e)
{
TextBox1.Text = "Hello, Web
Forms!";

}
}
}

PLEASE HELP
THANK YOU IN ADVANCE

Reply With Quote
  #2  
Old   
Peter van der Goes
 
Posts: n/a

Default Re: Method not found: Void System.EventHandler..ctor(System.Object, IntPtr). - 07-17-2003 , 09:32 AM







"zee" <zukhanye (AT) mailbox (DOT) co.za> wrote

Quote:
Hi!
While trying to run my first web application using
Microsost Visual Studio .net I came up with the following
error:
Method not found: Void System.EventHandler..ctor
(System.Object, IntPtr).
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and where
it originated in the code.

Exception Details: System.MissingMethodException: Method
not found: Void System.EventHandler..ctor(System.Object,
IntPtr).

Source Error:


Line 32: // CODEGEN: This call is
required by the ASP.NET Web Form Designer.
Line 33: //
Line 34: InitializeComponent();
Line 35: base.OnInit(e);
Line 36: }

The application is meant to do the following: CLick a
buuton and a msg in a textbox appears (typical hello world
scenario) the problem is I dont know what is wrong the
code is attached below:
<Snip code generated by the IDE>

Quote:
private void buthead_Click(object sender,
System.EventArgs e)
{
TextBox1.Text = "Hello, Web
Forms!";

}
}
}

PLEASE HELP
THANK YOU IN ADVANCE
This above is the only code you wrote, correct? Out of curiosity, I tried
the same thing and had no difficulties, so I'll start you off by suggesting
the following (I'm sure others will have better ideas):

1. Is your TextBox1.Text = ... really broken inside the literal string with
a newline?. If it is, fix that and try again. If that doesn't work...

2. Be sure you didn't modify any generated code. To be sure, create a new
project just like this one and see if the error is reproduced.

3. If the error repeats, try to repair your installation of VS.NET

HTH!




Reply With Quote
  #3  
Old   
Andrew Downum
 
Posts: n/a

Default Method not found: Void System.EventHandler..ctor(System.Object, IntPtr). - 07-17-2003 , 06:13 PM



This kind of error occurs when you have used incorrect
syntax in your aspx file (not the codebehind). It occurs
when the aspx page cannot be compiled.

If you want further help here, send in the aspx source so
we can see where the error is, or if you want to do it
yourself, click on the "show full source" (or something
like this) link on the error page, and go to the specified
line to see what it is trying to do.

~ Andrew
Quote:
-----Original Message-----
Hi!
While trying to run my first web application using
Microsost Visual Studio .net I came up with the following
error:
Method not found: Void System.EventHandler..ctor
(System.Object, IntPtr).
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and
where
it originated in the code.

Exception Details: System.MissingMethodException: Method
not found: Void System.EventHandler..ctor(System.Object,
IntPtr).

Source Error:


Line 32: // CODEGEN: This call is
required by the ASP.NET Web Form Designer.
Line 33: //
Line 34: InitializeComponent();
Line 35: base.OnInit(e);
Line 36: }

The application is meant to do the following: CLick a
buuton and a msg in a textbox appears (typical hello
world
scenario) the problem is I dont know what is wrong the
code is attached below:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace HelloWorld
{
/// <summary
/// Summary description for WebForm1.
/// </summary
public class WebForm1 : System.Web.UI.Page
{
protected
System.Web.UI.WebControls.TextBox TextBox1;
protected System.Web.UI.WebControls.Label
Label1;
protected System.Web.UI.WebControls.Button
buthead;

private void Page_Load(object sender,
System.EventArgs e)
{
// Put user code to initialize the
page here
}

#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required
by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}

/// <summary
/// Required method for Designer support -
do not modify
/// the contents of this method with the
code editor.
/// </summary
private void InitializeComponent()
{
this.buthead.Click += new
System.EventHandler(this.buthead_Click);
this.Load += new
System.EventHandler(this.Page_Load);

}
#endregion

private void buthead_Click(object sender,
System.EventArgs e)
{
TextBox1.Text = "Hello, Web
Forms!";

}
}
}

PLEASE HELP
THANK YOU IN ADVANCE
.


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.