Attributes of Controls on a Page

  • Thread starter Thread starter mosscliffe
  • Start date Start date
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
 
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
 
Back
Top