Common_CustomControls_CSharp\CustomControlsWebSite\WebUserControl.ascx.cs
// Copyright 2010 ESRI // // All rights reserved under the copyright laws of the United States // and applicable international laws, treaties, and conventions. // // You may freely redistribute and use this sample code, with or // without modification, provided you include the original copyright // notice and use restrictions. // // See the use restrictions. // using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class WebUserControl : System.Web.UI.UserControl { protected override void OnInit(EventArgs e) { base.OnInit(e); // Buddy the Map, MapResourceManager, Toc, and Toolbar Map1.MapResourceManager = this.MapResourceManager1.UniqueID; Toolbar1.BuddyControls.Add(new ESRI.ArcGIS.ADF.Web.UI.WebControls.BuddyControl(Map1.UniqueID)); Toc1.BuddyControl = Map1.UniqueID; } }