Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / April 2008

Tip: Looking for answers? Try searching our database.

Change Property Value

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
shapper - 22 Apr 2008 01:38 GMT
Hello,

I created 2 master pages and a page related as follows:

Master1 > Master2 > MyPage

In MyPage I need to access a user control that I added to Master1 to
change a few of its properties.

For that I created a property in Master1 and a property in Master2:

Master1:

 Public Property Nav() As Navigation
   Get
     Return ucNavigation
   End Get
   Set(ByVal value As Navigation)
     ucNavigation = value
   End Set
 End Property

Master2:

 Public Property Nav() As Navigation
   Get
     Return Master.Nav
   End Get
   Set(ByVal value As Navigation)
     Master.Nav = value
   End Set
 End Property

I also added the following code lines in Master1, Master2 and MyPage
aspx code:

Master1:

<%@ Reference VirtualPath="~/Navigation.ascx" %>

Master2:

<%@ MasterType VirtualPath="~/Master1.master" %>
<%@ Reference VirtualPath="~/Navigation.ascx" %>

MyPage:

<%@ MasterType VirtualPath="~/Master2.master" %>

Finally in MyPage Page.Init event I did the following:

Master.Nav.PageName = "Default"

However I see no effects in my code. The property PageName in
ucNavigation control is nothing.

I looked and looked for what I am doing wrong but I can't figure this
out.

Does anyone knows what I am doing wrong?

Thanks,

Miguel
shapper - 22 Apr 2008 16:18 GMT
> Hello,
>
[quoted text clipped - 60 lines]
>
> Miguel

Please, anyone?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.