Just change the inherit property under page tag
<% Page inherit = "Project_Name.otherform"
change it to
<% Page inherit = "Project_Name.YourForm"
And you will see in form2.aspx.desginer.cs the class name is also changed and corrected.
**Let Me Explain:**
Let's Say you have 2 web forms test1.aspx and test2.aspx. You copied some piece of code from test1.aspx to test2.aspx, your test2.aspx file will use <% page tag as:
<% Page inherit = "Project_Name.test1"
which was supposed to be as:
<% Page inherit = "Project_Name.test2"
because of which your test2.aspx.designer.cs class name will be automatically changed to same as test1.aspx.designer.cs as it is a system generated file and you will be unable to use your control IDs.
After correcting your inherit property, save and Open test2.aspx.designer.cs to verify and you will see in that the class name is also changed.
it will be like:
public partial class test1
{
...
Changed in to
public partial class test2
{
...
Thanks me later ;)