Accessing a Master Page in ASP.Net can seem trivial for someone coming from an open source background. But once you start to understand the Massive helper methods that .NET provides it starts to get a little easier.
There are several different ways of accessing the MasterPage, but for this post I will be covering the FindControl Method and casting it to the correct object to access the properties.
Panel myPanel = (Panel)Master.FindControl("pnlMyPanel");
myPanel.Attributes["class"] = ""; // clears the classIn the example above I used it to access the <asp:Panel> with the ID of “pnlMyPanel” and change the Attributes["class"] to be empty. Once you use the FindControl to search the Master you must cast what it locates to the correct object. Pretty Simple.
UPDATE!! A plugin is now available for this tutorial that includes more features read more...
How often do you work with tables? I work with them quite a bit and styling t read more...
When running a site with a boat load of javascript, you may want to run a script read more...
Download Plugin THEMES: theme-lighttheme-dark<link href="{{ path to js read more...
Greetings All! Since everyone was digging the Star Comment Rating I decided that read more...