I have a web project in Visual Studio Express 2013. Currently it has a home page and 2 form pages. The first form page, aff.aspx, works perfectly and emails the form data to me when the submit button has been clicked. My second page, adv.aspx, looks how I want it to look, but the submit button at the bottom of the form calls the aspx.cs file from aff.aspx instead of its own. How can I tell the button to call adv.aspx.cs instead of aff.aspx.cs?
Thank you in advance for any help that you can offer.
I've had this issue a few times.
It normally happens when an .aspx page has been renamed, but the
class name hasn't been changed in all places in the new copy of the file.
So, open your
.aspx page, your
.aspx.cs.design files, and check that the names all refer to the new project & class name.
For example, in the following
SomeWebpage.aspx page, the project (SomeProject) & class (SomeWebpage) name are mentioned twice, in the first line:
<%@ Page Language="C#" EnableViewState="false"
.. and if that line ended with this...
... then this would cause your issue.