using an object control from another control

  • Thread starter Thread starter oterox
  • Start date Start date
O

oterox

I have an aspx file with 3 user controls:Header,menu and footer.
In the header i have this:
----------------------------------------------------------
Dim rm1 As ResourceManager =
ResourceManager.CreateFileBasedResourceManager("form1.EN",
"C:\Inetpub\wwwroot\Web\test", Nothing)
lblHeader.Text = rm1.GetString("greeting")
----------------------------------------------------------------

Must i do the same in every user control???


If i declare rm1 in the header, can i use it in the footer whitout
re-declaring it again like this: rm1.getstring("")

Should i declare rm1 in each user control???
 
A User Control is a class. If you declare "rm1" as a public property of the
Header class, you can access it from any other class.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.
 
Back
Top