cant set that label...from other page
I have a footer page:
footer.ascx which I reuse as a user control over and over across many pages. So I wanted to place a label on the bottom of this footer and change it based on the page I was on...
Basically this footer is a water mark to say the page that I am on...
For instacnce, if I am looking at default.aspx I want it to read "HOME" in that label. If I am on admin.aspx I want the label to read ADMIN.
For the life of me I cant make this work...
I placed the label in the footer...and I tried to write functions to obtain this text but it would not work...
Like I tried
Dim f as Footer
f.SetText("Admin")
Meaning it would call a public function inside this page and set the text. In the footer class I would have:
Public Function SetText(strText as String)
Me.lblMyLabel = strText
End Function
But I keep getting errors like cannot set null reference to this yada yaday yada...
I tried dimming it as a user control and trying to find it on the page and set it and that didnt work.
Can someone help me out ??????????
Thanks,
Jon