In ASP.NET 2.0, is there a way to reference a page control from a business object method, for example by accessing a "Pages" collection and use a construct like the below to access an individual page, control, and property?
Imports SomeNameSpaceFor.PagesCollection
Class TestClass
Sub TestSub
PagesCollection("NameOfTargetPage").NameOfTargetControl.NameOfControlProperty = whatevervalue
End Sub
End Class
Or could this be done by referencing the page by it's class name?
A page event would have initiated the object's method, so the page would be "live". I'd like to do this in a way that doesn't involve passing the control to the method through a method variable.
If not the above approach, is there a different way to reference a page control from a business object method?
For instance, is possible to pass the entire set of controls to the custom object for one page, and then specify an item in that collection?
Thanks!
Imports SomeNameSpaceFor.PagesCollection
Class TestClass
Sub TestSub
PagesCollection("NameOfTargetPage").NameOfTargetControl.NameOfControlProperty = whatevervalue
End Sub
End Class
Or could this be done by referencing the page by it's class name?
A page event would have initiated the object's method, so the page would be "live". I'd like to do this in a way that doesn't involve passing the control to the method through a method variable.
If not the above approach, is there a different way to reference a page control from a business object method?
For instance, is possible to pass the entire set of controls to the custom object for one page, and then specify an item in that collection?
Thanks!