asp.net - Programmatic accessing a control from base to derived? -
in recent post, expressed need access properties body using declarative syntax, see
contentplaceholder replacing attributes?
i thought first suggestion solved problem. but, syntax confuses editor not acceptable.
my hypothesis workable solution make change in code. derive class system.web.ui.page extended functionality. however, want designer able still use declarative syntax set body tag.
in other words,
i not want have change code in aspx web pages except derive base
i want able set these properties using declarative syntax, merely adding tag in derived page
i'm not sure how go doing because doesn't fit oop paradigm , i'm not sure changes need made.
initial hypothesis,
i can use findcontrol in base see if placeholder has been added. but, not sure @ point in page processing lifecycle can use findcontrol. need set body before renders able grab declarative code.
i hope i'm trying accomplish clear(?) basically, want able edit user defined tag in aspx page change class body in master page.
why not create custom server control (called bodyattributemanager
) not render anything, looks @ attributes , programatically adds them body
element on prerender
?
Comments
Post a Comment