Posted on: 9/21/2012 11:52:27 PM | Views : 229

Hi Fourm, 
I am trying to write a UC to display Google Maps.
What I wanted to do was for the user control to insert an new entry in my DB if the property I wassed to it was null / nothing.
Dim Map = MapService.GetLocation(xxx) GoogleMapEditor1.Map = Map So in the above GoogleMapEditor1 is my user control, and Map is creating my map DTO object that I am sending to the UC. The thing that the map object could be nothing / null if not DAL does not return a map object.
I wanted to pass the map object NULL or not to the user control and have the control insert new record into the DAL if nothing, and pass back the new DB PK from the UC to the containing page.
The Problem (I think but I am not sure) is I cant test the map property in the UC until the page_load event, because my code above is also the page load event.
The order as I understand things is
User Control Pre Init
Page PreInit
Go to the complete details ...