You'd be better off moving EditProject.aspx to a user control, EditPorject.ascx.
Userconrols work much the same as aspx pages, supporting the same events, but you can embed them within ASPX pages like so:
<div id="edit-project-popup">
<namespace:EditProject ID="editProject" runat="server" />
</div>
You can still access the query string parameters from the usercontrol. You can also pass values to the usercontrol by adding a property:
public partial class EditProject : UserControl
{
public int ID
{
get;
set;
}
protected void Page_Load(object sender, EventArgs e)
{
// Your Code
}
}
You can then set this property in the ASPX pages markup:
<uc:EditProject ID="editProject" runat="server" ID="xxx" />
or in the ASPX pages code behind:
editProject.ID = "xxx";
Hope this helps.
For more information on user controls see this overview on MSDN:
http://msdn.microsoft.com/en-us/library/fb3w5b53(v=vs.100).aspx