PC Review


Reply
Thread Tools Rate Thread

ASP.Net 2.0 - how to add custom style into page header in code

 
 
=?Utf-8?B?U2VyZ2V5IFBvYmVyZXpvdnNraXk=?=
Guest
Posts: n/a
 
      30th Apr 2007
Hi,

What is the "right" way to create the following css rule in a page header:
<style>
.myRule{text-align:right;padding-right:10px;}
</style>

I know that you can add simple styles as follows:
this.Page.Header.StyleSheet.CreateStyleRule(style, this.Page,
".mySimpleRule");
but then I am not sure how to set text-align, padding or similar styles to a
System.Web.UI.WebControls.Style object

I am trying to avoid putting literal into my header and altering its content.

Any help is appreciated.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
page break causes shaded header style to appear on prev page jkeva410 Microsoft Word Document Management 5 30th Jul 2008 01:17 PM
Omit header from first page without embedding header in code =?Utf-8?B?aWJ2YWxlbnRpbmU=?= Microsoft Excel Worksheet Functions 6 28th Aug 2007 05:10 AM
ASP.Net 2.0 - how to add custom style into page headerin code in Sergey Poberezovskiy Microsoft ASP .NET 2 2nd May 2007 02:31 AM
ASP.Net 2.0 - how to add custom style into page headerin code Sergey Poberezovskiy Microsoft ASP .NET 1 1st May 2007 12:18 PM
Dynamically changing style definitions in page header Jason_SanDiego2006 Microsoft ASP .NET 2 6th Mar 2007 09:15 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:20 AM.