I came across this problem as well. You have to define your current page in load.
protected void Page_Load(object sender, EventArgs e)
{
Page page = new Page(); //I think it is Page control. I am not sure right now, I dont have access to the code I made for that right now. But you propably get the main idea.
page=this;
Label c = new Label();
c= Label1; //Might be c= this.Label1
}
and then from class you can do:
page.c.Text="I found you";
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.