Well this is a quicky for you. To find an element on a master page it’s really simple just use:
Dim pagebody As HtmlGenericControl = CType(Master.FindControl(“pagebody”), HtmlGenericControl)
pagebody.Attributes.Add(“style”, “background-color:black;”)
Basically the key to this is Master.FindControl(“my control ID”) and you use CType to convert it, in this case to a basic HtmlGenericControl. This example is used for adding an attribute to the body tag in the master page. Great for javascript solutions like onscroll or any other mouse event.
This is a remarkable scandal. ,
Comment by Kelvin63 — October 22, 2009 @ 11:26 am
The information contained in this page is brilliant. ,
Comment by Barbara29 — October 23, 2009 @ 10:31 am