Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.

Change Property Value

බැලීම් 0
පළමු නොකියවූ පණිවිඩය දක්වා මඟ හරින්න

shapper

නොකියවූ,
2008 අප්‍රේල් 21, 20.38.002008-04-21
සිට
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

නොකියවූ,
2008 අප්‍රේල් 22, 11.18.592008-04-22
සිට

Please, anyone?

නව පණිවිඩ 0