protected void Page_Load(object sender, EventArgs e) { /// /// modify existing meta defined in master page /// HtmlMeta meta = Page.Header.FindControl("metaRedirect") as HtmlMeta; foreach (string metadata in MetaDataCollection) meta.Content += metadata; /// /// adding content specific styles into content page's header /// HtmlLink link = new HtmlLink(); link.Href = "~/styles/default.css"; link.Attributes["rel"] = "stylesheet"; Page.Header.Controls.Add(link); /// /// adding content specific scripts into content page’s header /// HtmlGenericControl script = new HtmlGenericControl("script"); script.Attributes["src"] = Page.ResolveUrl("~/scripts/default.js"); Page.Header.Controls.Add(script); } public IEnumerable<string> MetaDataCollection { get; set; }
Friday, September 12, 2008
Adding page specific scripts (java scripts), styles to web content pages: Microsoft ASP.NET
Subscribe to:
Post Comments (Atom)
Azure Storage Account Types
Defferent Types of Blobs Block blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually...
-
Why we need asynchronous tasks? Execute a time consuming operations in parallel to the CLR thread which execute the request If you have ...
-
Demo: I was thinking a way to show images before actually uploading them to server. I would say to preview images using javascript. Obv...
No comments:
Post a Comment