I wanted to copy my .aspx file and paste it with all its content,
but I run into an error.
this is what I did :
1. Copy – Paste.
2. rename the new aspx file in the solution explorer.
3. rename the Inherits in the aspx file (the “code behind” there was already changed automatically for some reason..)
I run into an error : “Type WebApplication21.Home” already defines a member called Page_Load with the same parameter types
Thanks.
In the code behind (
.aspx.cs) file, you need to ensure the class name has also changed.And in the
.aspxpage, in the@ Pagedirective make sure the correct class name is used.On another note: Why is “copy and paste” of code dangerous?