TheEagle
June 28th, 2007, 09:43 AM
Hi..
Metakeywords is a simple property I defined in the default page to get a member value:
string metakey; .Its code as following:
public string Metakeywords
{
get{return metakey;
}
set
{
ViewState["metakey"]=value;
metakey=(string)ViewState["metakey"];
}
}
I have used the viewstate trying to solve the problem but it doesn't make any different.
This property exist in three places:
1-default page.
2-a usercontrol(I called it welcome) in the default page.
3-a usercontrol which is loaded dynamically (in code behind) into the welcome usercontrol using the code:
contentList.Controls.Add(Page.LoadControl("UserControls/FieldContentsList.ascx"));
FieldContentsList fieldus=(FieldContentsList)contentList.Controls[0];
this.Metakeywords=fieldus.Metakeywords;
The problem is:I want to set the property in the (3-) usercontrol and get the value in the (1-)default page.
Could any one help me to solve this problem.
Metakeywords is a simple property I defined in the default page to get a member value:
string metakey; .Its code as following:
public string Metakeywords
{
get{return metakey;
}
set
{
ViewState["metakey"]=value;
metakey=(string)ViewState["metakey"];
}
}
I have used the viewstate trying to solve the problem but it doesn't make any different.
This property exist in three places:
1-default page.
2-a usercontrol(I called it welcome) in the default page.
3-a usercontrol which is loaded dynamically (in code behind) into the welcome usercontrol using the code:
contentList.Controls.Add(Page.LoadControl("UserControls/FieldContentsList.ascx"));
FieldContentsList fieldus=(FieldContentsList)contentList.Controls[0];
this.Metakeywords=fieldus.Metakeywords;
The problem is:I want to set the property in the (3-) usercontrol and get the value in the (1-)default page.
Could any one help me to solve this problem.