using an object control from another control

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???
 
K

Kevin Spencer

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top