Based on my reading, ClassName
and Inherits
attributes on the @ Master
directive seem to do almost the same thing. I have read this page on MSDN and many other sources, and I'm still confused. This forum page seems to indicate that the Inherits
attribute specifies the name of the class that will represent the master page at run time. The MSDN page, more vaguely, seems to say the same thing. This, then, would also be the name of the partial class specified in the code-behind file.
Reading about the ClassName
attribute on MSDN, it seems to mean the same thing. I've tried many experiments in my code but still can't get things to work.
What, exactly, do these two attributes do, and what is the difference between them?
Ultimately, what I'm hope to accomplish is to allow my .aspx pages to access a public method in the code-behind file of the master page, as described on several posts including this one.