Looping thru asp.net controls in opener page

T

tshad

I was trying to do this in Javascript but found I can't do spans (which is
what Labels turn into).

I can do a loop thru a control list something like:

Public Sub LoopingControls(ByVal oControl As Control)

Dim frmCtrl As Control

oArrayList = New ArrayList

For each frmCtrl in oControl.Controls

If TypeOf frmCtrl Is TextBox Then

oArrayList.Add(New UtilityObj(frmCtrl.ID, directcast(frmCtrl,
TextBox).Text))

End If

If frmCtrl.HasControls Then

LoopingControls(frmCtrl)

End If

Next

End Sub



But I also want to do this on the opener page for a preview page. How would
I call this using the control list from my opener page?



Thanks,



Tom
 
B

bruce barker

you can't with server code, only with javascript. what you are trying to
do with javascript is trivial. please read a few browser dom docs.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top