How do I pass arguments by reference...!? I thought that it was default. I tried the following...
Code:
OCMSPage ocmsPage = null;
Distribute(pageType, ocmsPage);
if(ocmsPage != null)
{
ocmsPage.Make(pageID);
Page.Controls.Add(ocmsPage);
}
Don't mind the type (OCMSPage). The method Distribute will do somthing like this (only piece of Distribute)...
Code:
oPage = (main_ascx) Page.LoadControl("controls/main.ascx");
oPage.ID = "ocmsPage";
And this has worked fine before I tried to put it into a seperate method, and works if I return the OCMSPage instead!
Thanks
Jacob.