Author: thatguythere | Posted on: 7/4/2008 7:28:18 AM | Views : 344


 The basic premise is this; I want to access a label from a class, which would normally be fine by using something similar to this:


Dim currentPage As System.Web.UI.Page



currentPage = System.Web.HttpContext.Current.Handler

CType(currentPage.FindControl("label1"), Label).text
Now when I create an Instance of the class in the master page, using this is fine:




CType(currentPage.Master.FindControl("label1"), Label).Text



But if I create the instance within the actual page that goes in the content place holder it doesn't work. I'm sure its something dumb I've missed but I've tried loads of variations and while everything is fine when the instance is created in the master, I just can't get it to work in the actual page.






Anyone have any ideas?
Thanks in advance


Go to the complete details ...