Attributes of Controls on a Page

M

mosscliffe

I am still very new to all this, so please bear with me.

I am trying to create a debugButton, which when pressed would give me a
list of all the controls on a page and their attributes, but I just
can't work out the syntax. I have tried lots of combinations of the
code below, but rather than show that I will show it in pseudo code


dim cntrl as control
dim attr as attribute

for each cntrl in page.controls

response.write("Control: " & cntrl.name & "Type: " & control.type &
"<BR>")

for each attr in cntrl.attributes

if not isnothing(cntrl.attibute) then
response.write(attr.name & " = " & attr.value)
next
next


You will see from the above how naive I am in VB OOP syntax

Thanks

Tim
 
M

mosscliffe

Thanks for that tip, I had not got as far as investigating trace. That
has raised many more questions.

The most obvious one is why my button1 routine is not in the Trace
Information List.

But I would still like to achieve my original request, so that I can
create a page, for documentation purposes, that gives me a list of the
attributes, which have been set for each control.

Thanks

Tim
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top