hi,
some controls have common properties like Attributes property of textbox, hidden boxes etc.
now i want to write a script that reads through the entire page and gets all the controls in the page.
what i want to know is, is there a way to automatically convert them rather than something like this:
if(typeof ChildControl is TextBox) then
ChildControl=ctype(ChildControl,TextBox)
elseif(typeof ChildControl is HtmlInputHidden) then
ChildControl=ctype(ChildControl,HtmlInputHidden)
end if
the code that i have provided is just a sample listing of the controls that i intend to cover.
what i am looking for is:
ChildControl=ctype(ChildControl,GetControlTypeDynamically)
one more thing. i tried this:
ChildControl=ctype(ChildControl,ChildControl.GetType())
this gave me an error. on searching on the net i got some info that said that this is a compile time info and therefore cannot be used in the code...
Known is handfull, Unknown is worldfull
some controls have common properties like Attributes property of textbox, hidden boxes etc.
now i want to write a script that reads through the entire page and gets all the controls in the page.
what i want to know is, is there a way to automatically convert them rather than something like this:
if(typeof ChildControl is TextBox) then
ChildControl=ctype(ChildControl,TextBox)
elseif(typeof ChildControl is HtmlInputHidden) then
ChildControl=ctype(ChildControl,HtmlInputHidden)
end if
the code that i have provided is just a sample listing of the controls that i intend to cover.
what i am looking for is:
ChildControl=ctype(ChildControl,GetControlTypeDynamically)
one more thing. i tried this:
ChildControl=ctype(ChildControl,ChildControl.GetType())
this gave me an error. on searching on the net i got some info that said that this is a compile time info and therefore cannot be used in the code...
Known is handfull, Unknown is worldfull