About Me

My photo
a Dynamic and Energetic guy.....

Monday, April 20, 2009

Apply a style sheet + style class programatically

Finally we were managed to do this(Apply a style sheet programatically ) :)

Table objTable = new Table();

objTable.Attributes.Add("href", "txtstyle.css");
objTable.Attributes.Add("type", "text/css");
objTable.Attributes.Add("rel", "stylesheet");
objTable.Attributes.Add("class", "ph11");

Page.Controls.Add(objTable);


Remember to add tag in "ASPX" page also
<
link
href="txtstyle.css"
rel="stylesheet"
type="text/css"
/>

No comments:

My Masters