Wednesday, June 2, 2010

Change Theme Folder Style Sheet ASP.NET

01.Add New Style Sheet in to the theme folder.
02.Write Bellow Code in to the Code Behind.

string css = @"<link )="" +="" @="" app_themes="" blue="" css="" href="" rel="" stylesheet2.css="" stylesheet="" text="" this.resolveurl(="" type=""></link>";

ScriptManager.RegisterClientScriptBlock(this.Page, GetType(), "_calcss", css, false);

It Replace In .aspx Page Like>>>>>>>>>>>


</title><link href="App_Themes/Red/StyleSheet.css" type="text/css" rel="stylesheet" /><link href="App_Themes/Red/StyleSheet2.css" type="text/css" rel="stylesheet" /></head>

<form name="form1" method="post" action="WebForm1.aspx" id="form1">


<link href="/App_Themes/Blue/StyleSheet2.css" type="text/css" rel="stylesheet" />


No comments:

Post a Comment