private void Page_Load(object sender, System.EventArgs e) { if (!Page.IsPostBack) { // Remove the map from session; we want to use ours MapInfo.Engine.Session.Current.MapFactory.Remove (MapControl1.MapAlias); // Create a empty map with same aliasas MapControl MapInfo.Engine.Session.Current.MapFactory.CreateEmptyMap (MapControl1.MapAlias, MapControl1.MapAlias, new Size(200,200)); // Load the map with table. MapInfo.Mapping.MapLoader ml = MapInfo.Mapping.MapLoader.CreateFromFile(@"World.tab"); //Get the map object out of session we just created MapInfo.Mapping.Map map = MapInfo.Engine.Session.Current.MapFactory [MapControl1.MapAlias]; if (map != null) { ml.Load(map); MapControl1.Map = map; } } }