Free Jobs
Reference




Dot Net Forums: ASPNET (77) C#.NET (39) VB.NET (8) AJAX (21) Silver Light (1) WCF (10) WPF (1) WWF (1) .NET 3.5 (3) SQL SERVER (38) Other (3)

Topic: How to loop through all the controls in an ASP.NET AJAX TabContainer

To get the Posted Questions details daily in your mail Click Here

Share this Post on Facebook/Twitter/Orkut Bookmark and Share





User: smart_developer Post Date: 24 Apr 2012 12:56

Introduction:
HiAll,
myself rajan from Delhi. I''m a software developer in Red Hat. You Can ask any type of Query Related to .NET, Database (SQL Server) at any time at my email id-rajan1155@gmail.com or you can also upload query at www.facebook.com/smartdevelopers



Main Content:
   protected void btnLoop_Click(object sender, EventArgs e)
    {

        AjaxControlToolkit.TabContainer container = (AjaxControlToolkit.TabContainer)TabContainer1;

        foreach (object obj in container.Controls)

        {

            if (obj is AjaxControlToolkit.TabPanel)

            {

                AjaxControlToolkit.TabPanel tabPanel = (AjaxControlToolkit.TabPanel)obj;

                foreach (object ctrl in tabPanel.Controls)

                {

                    if (ctrl is Control)

                    {

                        Control c = (Control)ctrl;

                        foreach (object innerCtrl in c.Controls)

                        {

                            if (innerCtrl is System.Web.UI.WebControls.TextBox)

                                Response.Write(((TextBox)innerCtrl).Text);

                        }

                    }

                }

            }

        }

 

    }

Conclusion:
ASP.NET AJAX Tb Container



About Writer:
Rajan Singh is working with Red Hat Infotech as a .NET Developer.


Writer's Link: www.facebook.com/smartdeveloperrajan

Writer's Email: rajan1155@gmail.com







Comments:
Post Comment





Similar Articles Top ArticlesLatest Articles Other Articles by this Author







www.freejobsreference.com Copyright © 2009-2011 | All Rights Reserved
All content of this website is protected by copyright laws and should not be reproduced in any form or by any means without written permission
(Best viewed in IE 8.0+ or Firefox 3.0+ at resolution of 1024 * 768 or higher)