D
DotNet
I'd like to capture an attribute of one control from another control called
in the same ASPX page. I can get the ID value, but no other attributes. How
does one do this?
Control MyControl = Parent.FindControl("HeaderTemplate");
if(MyControl != null) {
Response.Write("Value: " + MyControl.ID); //this works fine.
Response.Write("Value: " + MyControl.Section); //this doesn't
work!
Response.Write("Value: " + MyControl.Attributes("Section"));
//this doesn't work either!
}
Thanks.
in the same ASPX page. I can get the ID value, but no other attributes. How
does one do this?
Control MyControl = Parent.FindControl("HeaderTemplate");
if(MyControl != null) {
Response.Write("Value: " + MyControl.ID); //this works fine.
Response.Write("Value: " + MyControl.Section); //this doesn't
work!
Response.Write("Value: " + MyControl.Attributes("Section"));
//this doesn't work either!
}
Thanks.