System.Web.UI.Page.OnInit C# (CSharp) Метод

OnInit() защищенный Метод

protected OnInit ( EventArgs e ) : void
e System.EventArgs
Результат void
	protected internal override void OnInit (EventArgs e)
	{
		base.OnInit (e);

		List <string> themes = null;
		AddStyleSheets (StyleSheetPageTheme, ref themes);
		AddStyleSheets (PageTheme, ref themes);

		if (themes == null)
			return;
		
		HtmlHead header = Header;
		if (themes != null && header == null)
			throw new InvalidOperationException ("Using themed css files requires a header control on the page.");
		
		ControlCollection headerControls = header.Controls;
		string lss;
		for (int i = themes.Count - 1; i >= 0; i--) {
			lss = themes [i];
			HtmlLink hl = new HtmlLink ();
			hl.Href = lss;
			hl.Attributes["type"] = "text/css";
			hl.Attributes["rel"] = "stylesheet";
			headerControls.AddAt (0, hl);
		}
	}
Page