ASP.NET masterpage public variables error
<p>I have public variable 'MessagePlaceholder' on MasterPage and a Class that accesses this property like that setting it's value to string from getMessage();</p>

<pre><code>((HttpContext.Current.Handler as System.Web.UI.Page).Master as MasterPage).MessagePlaceholder = getMessage();
</code></pre>

<p>which gives me an error like this one</p>

<p>Error   3   'System.Web.UI.MasterPage' does not contain a definition for 'MessagePlaceholder' and no extension method 'MessagePlaceholder' accepting a first argument of type 'System.Web.UI.MasterPage' could be found (are you missing a using directive or an assembly reference?)</p>

<p>What should i do ?</p>
