as Usercontrol

  1. #1

    as Usercontrol



    hi


    i created a toolbar usercontrol. the usercontrol inherits from
    ext.Toolbar. i'm trying to put the usercontrol in the aspx file between
    the <TopBar>. But this dosen't work. how could i do this.


    thank for any help
  2. #2

    RE: as Usercontrol

    *I am currently doing this will no issues (although I do have a question I'll ask in a different post about events). *But, this is what I'm doing to get it to work (sample code):

    using Coolite.Ext.Web;
    
    
    namespace Tools.Web.WebControls
    {
    	[DefaultProperty("Text")]
    
    	[ToolboxData("<{0}:ExportToolbar runat=server></{0}:ExportToolbar>")]
    
    	public class ExportToolbar : Toolbar
    
    	{
    
    		protected override void OnLoad(EventArgs e)
    
    		{
    
    			base.OnLoad(e);
    
    
    
    			// Do my stuff OnLoad
    
    		}
    
    
    		[DefaultValue(false)]
    
    		public bool AutoTooltip { get; set; }
    	}
    
    }

    Then in my Html:


    <%@ Register Assembly="Tools.Web" Namespace="Tools.Web.WebControls" TagPrefix="mytool" %>
    
    
    <ext:TabPanel id="tpManager" runat="server">
    	<Tabs>
    
    		<ext:Tab id="tabPeople" runat="server" Title="Participants" Icon="Group">
    
    			<TopBar>
    
    				<mytool:ExportToolbar id="expExportParts" runat="server" AutoTooltip="false" />
    			</TopBar>
    
    			<Body>
    
    				<ext:Panel runat="server" border="false">
    
    					<Body>
    
    						Do Stuff!!!
    
    					</Body>
    
    				</ext:Panel>
    
    			</Body>
    		</ext:Tab>
    
    	</Tabs>
    
    </ext:TabPanel>

    Hope that helps!


Similar Threads

  1. Replies: 1
    Last Post: May 29, 2013, 6:00 PM
  2. Replies: 8
    Last Post: Feb 15, 2012, 9:04 AM
  3. Replies: 0
    Last Post: Aug 03, 2011, 10:27 PM
  4. Replies: 0
    Last Post: Mar 29, 2011, 3:59 PM
  5. [CLOSED] [1.0] DirectMethod - Page . UserControl . UserControl
    By Patrick in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Feb 25, 2010, 9:33 AM

Posting Permissions