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:
Posts (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...
-
Demo: I was thinking a way to show images before actually uploading them to server. I would say to preview images using javascript. Obv...
-
Demo : I am using asp.net UpdatePanel control to partial page update. As there is no keyup event for the asp.net TextBox control, I add an ...