473,803 Members | 3,616 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error message - Coding Error

126 New Member
Hi Good Guys,
I need your help again. Please help me.
While compiling my former Developer C# 2008 program I encounter these error messages.

One of the error message is About DELEGATE. I have not heard of this before.


Error message:

Error 2'CShartNet2008 GeneralApps.Frm DataGrid' does not contain a definition for 'btnExportXML_C lick' and no extension method 'btnExportXML_C lick' accepting a first argument of type 'CShartNet2008G eneralApps.FrmD ataGrid' could be found (are you missing a using directive or an assembly reference?)

Coding from File Name: FrmDataGridDesi gner.cs
Expand|Select|Wrap|Line Numbers
  1. this.btnExportXML.Font = new System.Drawing.Font("Verdana", 9F,       System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
  2.             this.btnExportXML.Location = new System.Drawing.Point(472, -2);
  3.             this.btnExportXML.Name = "btnExportXML";
  4.             this.btnExportXML.Size = new System.Drawing.Size(119, 24);
  5.             this.btnExportXML.TabIndex = 4;
  6.             this.btnExportXML.Text = "Export XML File";
  7.             this.btnExportXML.UseVisualStyleBackColor = true;
  8.             this.btnExportXML.Click += new System.EventHandler(this.btnExportXML_Click);
  9.  
  10.  
--------------------------------------

Another error message


Error 13 Expected class, delegate, enum, interface, or struct

Coding from File Name : FrmDataGrid.cs
Expand|Select|Wrap|Line Numbers
  1.   private void btnExportXML_Click(object sender, EventArgs e); handles BtnExportXML.Click
  2.         {
  3.  
  4.         } 
Sep 19 '10 #1
3 1473
ZiadElmalki
43 New Member
The first error is complaining because it cannot find btnExportXML_Cl ick.

The other error is because btnExportXML_Cl ick has the incorrect syntax and might not be nested inside a class. The stuff in bold is incorrect. There might be other errors else where in your code besides this. Post more if you need more help

private void btnExportXML_Cl ick(object sender, EventArgs e); handles BtnExportXML.Cl ick
{

}
Sep 22 '10 #2
Plater
7,872 Recognized Expert Expert
Yeah, check to make sure the namespaces match and that the function is either defined in the same class (since it is private) or in the 'partial' class.

However, in cases like these.... I find it is just better to delete that code and remake it. Wipe it out and crate a new event handler then copy/paste the functional code into the handler
Sep 22 '10 #3
lenniekuah
126 New Member
Hi ZiadElmalki and Plater,
Thanks to both of you for providing BEST ANSWER to my problem to dealing with the error message.
Sep 23 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1938
by: Mark | last post by:
Not sure this is the right place for this questions, but here goes: I get an error message when deleting an table from a Access database. The code is as follows and the error message is after it. ***************** Start Code ******************** <%@ import Namespace="System.Data" %> <%@ import Namespace="System.Data.Oledb" %>
4
2951
by: Mark | last post by:
Not sure this is the right place for this questions, but here goes: I get an error message when deleting an table from a Access database. The code is as follows and the error message is after it. ***************** Start Code ******************** <%@ import Namespace="System.Data" %> <%@ import Namespace="System.Data.Oledb" %>
7
1720
by: Leon Shaw | last post by:
Someone please help me understand the following error message: Server Error in '/solo' 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.
5
2112
by: Kim Nørby Andersen | last post by:
Hello there I am lost. i receive the output in the bottom, from a site that runs excellently on our development server, but dies on the customer. We have had a first version running at the customer, did some changes, recompiled, zipped and sent it back to them, but then it screwed up. As a part of the debugging process, the ASP.NET has been set to run as SYSTEM, and all folders described in...
5
9608
by: Kenneth P | last post by:
Hi, I get a Parser Error message when I try to start my asp.net app. Parser Error Message: Could not load type 'DiskoWeb.dLogin'. I have a code behind file and it's class name is dLogin. This the error message
1
1370
by: mar-kav | last post by:
Hello, i'm a beginner so exuse me: i installed IIS 5.1, Framework1.1, vs .NET 2003 i put my web dir' in inetpub/wwwroot, tried to broows to my homepage under localhost & got this error message: Server Error in '/' Application. -------------------------------------------------------------------------------- Configuration Error Description: An error occurred during the processing of a configuration
1
4147
by: Bruce | last post by:
We suddenly got a mysterious error message on our Windows Server 2003 (SP1) after rolling out a bug fix on a web services application this morning. The application compiles and runs fine on the development workstation (from vs 2005 on Windows XP Pro), but when I run "Copy Web Site..." to move the app out from VS to the server, then all accesses to the web service via a browser show this error message: "Compiler Error Message: CS0006:...
1
1873
by: Andrew Fenyo | last post by:
Help!!! I have been developing an application, and suddenly, whenever I try adding data, or adding a control to a form, I get the above message. I have tried moving the file from our server to the local machine, and also loading it from another machine, but to no avail. If I try and add data to a form, or click on a button on a form, the error message pops up and the VBA screen opens with the cursor at
1
2287
by: David Greenberg | last post by:
Hi In my DTS I am updating an Ingres database on a different server. I'm getting the following error immedtiately .... HResult of 0x80040e09 (-2147217911) returned Unexpected error occured. An error was returned without an error message Anyone know what its about ? Thanks !!
3
2513
by: lenniekuah | last post by:
Hi Good Guy, I am very surprised of the coding generate error message Error 1 Use of unassigned local variable 'strSql' even though the strSQL variable was declared. Not sure what is wrong with the overall coding; Here are the coding:
0
9703
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
9564
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9125
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7604
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
6842
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
4275
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
3798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2970
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.