Last post Jan 18, 2011 11:52 AM by Rouchie
Jan 18, 2011 04:05 AM|Rouchie|LINK
Within an existing ASP.NET page I've created the following layout, which is a tabbed header and content area. When the tabs are clicked (using JQuery) I show the relevant content, and hide all the other content for that respective tab, like so...
I'd like to expand this functionality to make it into a User Control, so that I could re-use the code more easily. Once the control is created, I'd like to be able to use it like this:
<Rouchie:TabbedControl id="tab1" runat="server">
<Rouchie:ContentArea Title="Tab 1 Text">
<asp:Gridview ... />
<asp:DropDownList ... />
<Rouchie:ContentArea Title="Tab 2 Text">
<Rouchie:ContentArea Title="Tab 3 Text">
Can anyone advise any links where I can start learning how to do this, or offer direct help on the code? I've read many tutorials for creating controls using existing controls (e.g. custom labels etc) but they are all too simple. With the above, do I need
to create a ContentArea control first, then work onto the TabbedControl? How do I get ASP.NET to render out the contents of my ContentArea (including ASP.NET controls that are contained within it)?
Jan 18, 2011 04:43 AM|HusamKhoulah|LINK
why not use AJAX TabContainer
If This Helps Please Mark as an Answer
Jan 18, 2011 04:54 AM|Rouchie|LINK
Thanks for your suggestion. Yes, that's similar to what I'm looking to achieve. However, I would like my version to be much simpler, without UpdatePanels in each content area. Is it possible to get at the source code for the control you suggested? If
so I could always use that as a basis to work from?
Jan 18, 2011 05:04 AM|HusamKhoulah|LINK
as far as I know UpdatePanel is optional in TabContainer just like any other control
anyway you can download the entire Ajax Control toolkit binaries or with full source code from :
If this Helps Please mark as an Answer
Jan 18, 2011 11:52 AM|Rouchie|LINK
Thanks, I'll take a look at that. From first impressions it looks pretty complex - I could do with a comment against each line of their code...!