473,386 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Iterate through ASP.Net Ajax Tab Container ?

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

Jun 27 '08 #1
2 1941
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.

--
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!
|
*************************************************
"Luqman" <pe*******@cyber.net.pkwrote in message
news:u%***************@TK2MSFTNGP06.phx.gbl...
>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

Jun 27 '08 #2
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

"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamMwrote in
message news:eh****************@TK2MSFTNGP06.phx.gbl...
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.

--
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! |
*************************************************
"Luqman" <pe*******@cyber.net.pkwrote in message
news:u%***************@TK2MSFTNGP06.phx.gbl...
>>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



Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: toton | last post by:
Hi, I have a container class, and I want to iterate over a portion of the container class while I insert/remove item from it. Noting down the present location & constructing iterator from there is...
0
by: =?Utf-8?B?bmt3?= | last post by:
1. Any shortcut if I put all controls in an Ajax container? 2. I have two ajax containers use a label for error message label, which had to put outside of the two containers or in a third...
2
by: defyinggravity | last post by:
Hi this is a newbie alert! This may seem really basic to most, but I am a total beginner, so please don't laugh, or gif me false info...lol I will use it. I have an ajax container loading on my...
4
by: brekehan | last post by:
I am implementing a event messaging system. Basically I do: ---update cycle--- processing/check for new events allocate a new event put it in a std::queue Dispatch events make an event...
1
by: conspireagainst | last post by:
Is there any possible way (I'm using prototype framework) to glean what the name of the container element to be updated (using Ajax.Updater) is? I have appended at the bottom of prototype.js a...
1
by: abaybas | last post by:
I'm creating a page in which a certain "content" part of the page is refreshed using ajax. I do this by using a div#content, and it's child div#container. the code: ... ...
1
by: shaunwo | last post by:
I'm an AJAX / DOM Novice (at best) and trying to figure out how to write the value to a couple input fields. I don't remember exactly where I got the ajax.js file I'm using from (went to the website...
3
Kelicula
by: Kelicula | last post by:
Hi all, I am usually a Perl programmer, I have some background in javascript and am attempting to create a Googleish selector div. Please bear with me, excuse the long introduction... Here's...
6
by: rayliu | last post by:
Recently, I have been attempting to pick up AJAX and discovered a slight problem with innerHTML.. I have <div id='container'></div> then ..
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.