Inserting a Style isn't difficult. Just use an HtmlGenericControl and set
its InnerText value to the style. See the code below.
Ken
Microsoft MVP [ASP.NET]
Protected Style1 As _
System.Web.UI.HtmlControls.HtmlGenericControl
Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
Style1.InnerText = _
"body{color:lime;font-family:'Comic Sans MS';}"
End Sub
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>style</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="
http://schemas.microsoft.com/intellisense/ie5">
<style runat="server" id="Style1">
</style>
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
This is the styled text
</form>
</body>
</HTML>
kw said:
anyone know of some way for a control to add a STYLE element into the HEAD
section?
I would think that MS would have thought of the equivalent of a
Page.RegisterHead method like RegisterStartupScript or
RegisterStartupScript