Custom Adding Title Tag :
Me.Header.Title = "Title Of Page Here"
Custom Adding Meta Tag :
Dim metaDescription As New HtmlMeta()
metaDescription.Name = "description"
metaDescription.Content = "A description of the page here."
Me.Header.Controls.Add(metaDescription)
Custom Adding Style :
Dim styles As New HtmlGenericControl("style")
styles.Attributes.Add("type", "text/css")
styles.InnerText = "p { font-weight: bold; }"
Me.Header.Controls.Add(styles)
Dim style As New Style()
style.ForeColor = System.Drawing.Color.Navy
style.BackColor = System.Drawing.Color.LightGray
Me.Header.StyleSheet.CreateStyleRule(style, Nothing, "body")
Custom Adding Css Style:
Dim cssLink As New HtmlLink()
cssLink.Href = "styles.css"
cssLink.Attributes.Add("rel", "Stylesheet")
cssLink.Attributes.Add("type", "text/css")
Me.Header.Controls.Add(cssLink)
Custom Adding Java Script:
Dim javaScript As New HtmlGenericControl("script")
javaScript.Attributes.Add("type", "text/javascript")
javaScript.InnerText = "alert('Hello World!');"
Me.Header.Controls.Add(javaScript)
All the above code should be used within page Page_Load event
Subscribe to:
Post Comments (Atom)
Ajax CalendarExtender displaying at wrong position in Chrome
< script type ="text/javascript" language ="javascript"> function onCalendarShown(sender, args)...
-
Suppose FieldName is the Bit field which tells whether the link should be visible true or false so design your gridview template like th...
-
There is no direct way to Expand/Collapse all panes in Accordion Extender. Using following java script, Accordion can be Expand/Collaps...
-
< script type ="text/javascript" language ="javascript"> function onCalendarShown(sender, args)...
This is a good article.
ReplyDelete