Hey guys/girls
I have a HyperLink in my MasterPage and i want to change the text of it from a ContentPage. This is how im doing it:
In masterpage i included a public property:
public string LinkExampleText
{
set { linkExample.Text = value; }
}
At the top of my content page, i added the following directive:
<%@ MasterType VirtualPath="~/MasterPage.master" %>
Now in my content page code bedind file, inside a button click event:
protected void button1_Click(object sender, EventArgs e)
{
Master.LinkExampleText = "NEW TEXT";
Response.Redirect("~/Default.aspx");
}
This definitely travels through the public property in the master page.. But the original text persists.. What am i doing wrong?