Avatar of BOEING39
BOEING39
 asked on

Submit Error

I am getting the following error with the attached code.  

Compiler Error Message: CS0117: 'ASP.train757_default_aspx' does not contain a definition for 'btnSubmit_Click'

Source Error:

 Line 45:                   
Line 46:                   
Line 47:                   <asp:Button runat="server" Text="Submit" id="btnSubmit" Width="85px"
Line 48:                     onclick="btnSubmit_Click" Height="26px" />
Line 49:                 </td>
 

Default.aspx.cs
Default.aspx
C#ASP.NET

Avatar of undefined
Last Comment
BOEING39

8/22/2022 - Mon
himanshut

Go to the designer Mode (View Designer) Select the Button -- > Go to Properties --> you'll see Event Icon on top (Yellow/Orange Lightening Icon) Click it --> then Next to "Click Event" Double Click and it will generate Client Event In Code Behind --> Copy paste your Submite Button code in there


Cheers!
Irzana

remove and add button again
himanshut

Nope,

Just use the same button, (Only Click it once" to select that button and then in properties, double click against the click event

Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
BOEING39

ASKER
Tried the properties button and redoing the event.   The event is there.   Removed and replaced the button with the event still the same problem with  the code:

CS0117: 'ASP.train757_default_aspx' does not contain a definition for 'btnSubmit_Click'
ASKER CERTIFIED SOLUTION
himanshut

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
BOEING39

ASKER
That worked thx
BOEING39

ASKER
I've requested that this question be closed as follows:

Accepted answer: 0 points for BOEING39's comment http:/Q_27249886.html#36347820
Assisted answer: 500 points for himanshut's comment http:/Q_27249886.html#36347350

for the following reason:

Most accurate answer.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
himanshut

What solution did work?
Anything different from the comments provided above!?
If yes, please specify
South Mod

All,
 
Following an 'Objection' by himanshut (at https://www.experts-exchange.com/Q_27250095.html) to the intended closure of this question, it has been reviewed by at least one Moderator and is being closed as recommended by the Expert.
 
At this point I am going to re-start the auto-close procedure.
 
Thank you,
 
SouthMod
Community Support Moderator
BOEING39

ASKER
My apologies.   I meant for you to get the points.   I closed in error without assigning points.  I sent the following ....



Assisted answer: 500 points for himanshut's comment http:/Q_27249886.html#36347350

for the following reason:

Most accurate answer.

This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23