473,387 Members | 3,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Change Property Value

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
Jun 27 '08 #1
1 1102
On Apr 22, 1:38 am, shapper <mdmo...@gmail.comwrote:
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
Please, anyone?
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Richard | last post by:
Hi, I have a DateTime picker control on a form. The datetime picker control is data bound to a column in a DataTable. Yes I know about bound DateTime pickers and DBNull and etc. so no troubles...
3
by: spielmann | last post by:
Hello I want to change the scrollbar size of windows, How can I do that with vb.net I have find this in VB6 but how can we convert simply this code. thx
3
by: Tom | last post by:
I am writing a Visual basic .Net database application. There are many forms that first let you select and look at a DB record and then when you click a "modify" button you are allowed to change...
0
by: Marc Robitaille | last post by:
Hello everyone, I have a control which inherits from another control. I added a contextual menu to the new control. To this new control, I added a Boolean property. This property enables me to...
10
by: rob | last post by:
I have a class that among others exposes a string property "Date". The date in this property is stored in the form yyyymmdd. Now I do the following 1) Generate a DataGridViewTextBoxColumn column...
1
by: Jim M | last post by:
After learning that the 'subdatasheet name' property set to "" can adversely effect database speed, I wanted to send a small code snippent to my end users to reset the SubdatasheetName Property so...
0
by: =?Utf-8?B?TWFydGluIw==?= | last post by:
Hello everybody! Please note that I have posted same question in different forums with no success. So If you tried to help me there, please do not consider the repost as rude! I'm working on...
3
by: tc | last post by:
I'm trying to put together a small control. It's not, but for arguments sake, let's say it's a progress bar. The user will make a change to a setting, lets call it 'value'. I want to trap the...
2
by: C. Herzog | last post by:
Hi! I want to create a huge amount of classes. All classes have in common that the change of a property should fire an Change-Event and maybe do other things. I don't want to write thousand...
6
by: gavy7210 | last post by:
hello i am using struts 1.2,Eclipse Platform Version: 3.4.2,mySql 5.0.1,jdk 1.5.. i have a login form(jsp) in which a user logs in,in case he doesnt enter his username and/or password an error...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.