ASP.NET masterpage public variables error

Posted by eugeneK on Stack Overflow See other posts from Stack Overflow or by eugeneK
Published on 2010-06-09T09:47:22Z Indexed on 2010/06/09 9:52 UTC
Read the original article Hit count: 256

Filed under:

I have public variable 'MessagePlaceholder' on MasterPage and a Class that accesses this property like that setting it's value to string from getMessage();

((HttpContext.Current.Handler as System.Web.UI.Page).Master as MasterPage).MessagePlaceholder = getMessage();

which gives me an error like this one

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?)

What should i do ?

© Stack Overflow or respective owner

Related posts about ASP.NET