Is there a map.ascx.cs file in the \ Controls website? If so, move it to App_Code. Note that you may need to update the CodeFile attribute in the .ascx file to ~ \ App_Code \ map.ascx.cs. Alternatively, since the control is a partial class, you can simply create the code in ~ \ App_Code \ map.cs as:
public partial class controls_Map : UserControl { protected void Page_Load( object sender, EventArgs e ) { ...code here.... } }
And remove all methods from the map.ascx.cs file in the control directory.
source share