G
Guest
In my web project I have a folder called "Controls". Into this folder there
is an ascx control called "Sidemenu". The user control has a get-set public
string proterty called "MenuType".
The Sidemenu control is used in the master page "MyApp.master". The
corresponding control's id is "Sidemenu1". The master page exposes the
Sidemenu1 control through a pubic propery called "LeftSizeMenu" as follows:
Public Sidemenu LeftSideMenu
{
get { return this.Sidemenu1; }
}
In a content page I need to get or set the "MenuType" propery. So I am
casting the this.Master to "MayApp" and I am trying to modify the
LeftSideMenu.MenuType propertry. The code is in "contentPage.apsx.cs" looks
as follows
MyApp masterPage = (MyApp)this.Master;
masterPage.LeftSizeMenu.MenuType = "management";
The intellisense is not working by typing the dot after the
masterPage.LeftSideMenu.
After compiling the web size I am getting two erros:
"The type 'Sidemenu' is defined in an assemply that is not referenced. Ypu
mast add a reference to assemply 'App_Web_svcryrq2, Version 0.0.0.0 ..."
And the second error is
"Sidemenu does not contain a definition of MenuType"
Both errors are appearing in line "masterPage.LeftSizeMenu.MenuType = ..."
Can someone explain me why all these?
Thanks
is an ascx control called "Sidemenu". The user control has a get-set public
string proterty called "MenuType".
The Sidemenu control is used in the master page "MyApp.master". The
corresponding control's id is "Sidemenu1". The master page exposes the
Sidemenu1 control through a pubic propery called "LeftSizeMenu" as follows:
Public Sidemenu LeftSideMenu
{
get { return this.Sidemenu1; }
}
In a content page I need to get or set the "MenuType" propery. So I am
casting the this.Master to "MayApp" and I am trying to modify the
LeftSideMenu.MenuType propertry. The code is in "contentPage.apsx.cs" looks
as follows
MyApp masterPage = (MyApp)this.Master;
masterPage.LeftSizeMenu.MenuType = "management";
The intellisense is not working by typing the dot after the
masterPage.LeftSideMenu.
After compiling the web size I am getting two erros:
"The type 'Sidemenu' is defined in an assemply that is not referenced. Ypu
mast add a reference to assemply 'App_Web_svcryrq2, Version 0.0.0.0 ..."
And the second error is
"Sidemenu does not contain a definition of MenuType"
Both errors are appearing in line "masterPage.LeftSizeMenu.MenuType = ..."
Can someone explain me why all these?
Thanks