[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1589
  • Last Modified:

Dev express tab active

I am using dev express Tab control.I am using three tabs each tab contains one user control

<dxtc:ASPxPageControl ID="_pageControl" runat="server"
    RenderMode="Lightweight" Width="100%"

            <%-- user Control--%>
            <dxtc:TabPage Name="_userTabControl1" Text="Test1" >
                        <dxc:ContentControl      ID="_userTabContentControl1" runat="server">
                              <rmsc:RoleMappingSearchControl ID="_MappingSearchControl" runat="server" />

                <%-- _userTabControl2--%>
        <dxtc:TabPage Name="_userTabControl2" Text="Test2" >
                <dxc:ContentControl ID="_userTabContentControl2" runat="server">
                    <hysc:HyperLinkSearchControl ID="HyperLinkSearchControl" runat="server"/>

            <%-- _userTabControl3--%>
            <dxtc:TabPage Name="_userTabControl3" Text="Test3"  >
                        <dxc:ContentControl      ID="_userTabContentControl3" runat="server">
                              <dxc:ContentControl ID="_userTabContentControl3" runat="server">



In above three tabs all tabs user controls are executing.
My requirement is only selected tab or active user controls will work.for example if i click 1st tab,1st tab user control only execute.If i click on second tab,It should not execute first tab it will execute only second tab...
* Visibility wise no issues.Only clickable tabs are visible.
Can u please help me regarding this
1 Solution
Sameer RaksheCommented:
If you are using Devexpress controls you must be aware of ASPXCallback Panel.
Keep Tab Pages and Call back panel separately.
at client side on Tab Page change event call callback panel.
Inside Call back panel load user controls respective to tab pages runtime.

Use Below code for reference. Also I'm attaching one sample Code. I haven't tasted this project but I had already applied this logic twice.

protected void ASPxCallbackPanel1_Callback(object source, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e) {
        if (e.Parameter == "Show") {
            Session["Loaded"] = true;
        else {

    protected void LoadUserControl() {
        Control control = LoadControl("~/DataViewUserControl.ascx");
        control.ID = "uc";
    protected void UnloadUserControl() {

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now