You can simply add an event handler to the Loaded Event page inside the Load Event control and do what you want.
Something like that:
this.Page.LoadComplete += (ObjectSender, ev) => { var mStyle = new Style(); mStyle.BorderWidth = new Unit(5); Page.Header.StyleSheet.CreateStyleRule(mStyle, null, "body"); };
ps. I used the lambda expression for simplicity.
Cleiton
source share