I want to access the master page controls on my code behind of content page. My code is like below:
Master page
<head runat="server">
<title></title>
<link rel="image_src" type="image/jpeg" runat="server" id="link1" />
<meta property="og:image" content="" id="mimage" runat="server" />
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div id="page">
........................
..........................
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
......................
</div><!--close page-->
</form>
</body>
</html>
On Code behind of Content Page, i want to write like below but it is giving me Error.
this.Master.Page.FindControl("link1").Href= "http://mywebsiteURL/images/Conference/Gallery/" + dataTable.Rows[CurrentPage]["Image"].ToString();
mimage.Contents= "http:/mywebsiteURL/images/Conference/Gallery/" + dataTable.Rows[CurrentPage]["Image"].ToString();
How i will write link1.Href and mimage.Contents on code behind of content page. Please guide me.