I have a lable I want to update on a web form page from another class. I created an instance of that class then referenced a public method to do the update since I was unable to access the lable control directly. But when it reaches the public method it seems as if the controls were initialized and are not recognizable.
*...' calling class*
dim kws as new form2class
kws.setErrorLable("ERROR FOUND" & ex.message.tostring)
.....
called class
public sub serrorLable(Byval msg as string)
label10.text=msg
end sub
Am I missing something here? Thanks in advance
You can access the current page like this:
Depending on where the label is in the page, you may need to use recursion to find the Label, but the above code will get you to the current page.