Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / April 2008

Tip: Looking for answers? Try searching our database.

Iterate through ASP.Net Ajax Tab Container ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Luqman - 25 Apr 2008 22:46 GMT
I have a Ajax Tab Container on my Webform with One Panel and some Labels and
Textboxes.

I want to Iterate through all the textboxes and return their IDs.

I tried every possibility I could but I was unable to retrieve their IDs.

Here is my code, which returns nothing.

Dim ctrl as new Control
for each ctrl in me.tabpanel1.controls
if typeof ctrl is textbox then
msgbox(ctype(ctrl,textbox).ID.ToString)
end if
next

Any idea what am I missing ?

Best Regards,

Luqman
Cowboy (Gregory A. Beamer) - 26 Apr 2008 15:28 GMT
As you iterate look at the names of the controls. You may not be deep
enough. If I am correct, you will have to find the actual panel inside the
tab and iterate through its controls to get deep enough into the hierarchy.

Signature

Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************

| Think outside the box!

*************************************************
>I have a Ajax Tab Container on my Webform with One Panel and some Labels
>and
[quoted text clipped - 18 lines]
>
> Luqman
Luqman - 27 Apr 2008 07:55 GMT
Hi,

For every control in Tab Panel, it just returns system.web.ui.control type,
why its not returning system.web.ui.textbox ?

You can check with the following code.

Dim ctrl as new Control
for each ctrl in me.tabpanel1.controls
msgbox (ctrl.gettype.tostring)
Next

Best Regards,

Luqman

> As you iterate look at the names of the controls. You may not be deep
> enough. If I am correct, you will have to find the actual panel inside the
[quoted text clipped - 25 lines]
>>
>> Luqman

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.