C# Are you missing a using directive or an assembly reference?
This error message started appearing during compilation after I deleted the entire code for the tabPage1_Click event behavio开发者_如何学编程r.
It didnt have any body code in it, because I accidentaly clicked on it fast two times and the event code got added to the source when I just started programming the application. Now I'm done and everything is tip top, except that useless definition of tabPage1_Click.
Error 1 'Bar.placeOrderForm' does not contain a definition for 'tabPage1_Click' and no extension method 'tabPage1_Click' accepting a first argument of type 'Bar.placeOrderForm' could be found (are you missing a using directive or an assembly reference?) C:\admin\Bar\Bar\placeOrderForm.Designer.cs 96 67 Bar
Go into the designer for your placeOrderForm form, select tabPage1 from the field list in the Properties window, select the Events view and just clear the entry (should read tabPage1_Click) in the Click event.
Should see you right.
Deleted the highlighted line in the .designer.cs file
Double click the error, you jump to the offending line, you will find somethin like:
...+=tabPage1_Click(...)
remove that line too since is referring an event handler that does not exists anymore.
Basically what's happened is that the form generator still thinks there should be an event there, so it generates the code to set up the event, and then the compiler ends up scratching its head and wondering what the form designer is thinking.
What you want to do is select tabPage1 in the designer, then look over to the Properties window and click the lightning bolt to switch to looking at the events. Then scroll down to Click
and empty out that box.
For Solution Check ur Webapplication dll and pdb file or As update bin folder upload
精彩评论