I am using a asp page to dynamically create a stylesheet
my asp page creates the following css element when i call the asp page my
typing the url in the browser. My asp page works fine............
body {
font-family : Arial, Helvetica, Sans-Serif, Verdana ;
margin : 0 ;
padding : 0 ;
}
..portal_nav {
margin-right : 30px ;
margin-top : 3px ;
}
#white_bar_1 {
height : 6px ;
width : 985px ;
background-color : #B32B3F ;
}
#white_bar_2 {
height : 8px ;
width : 985px ;
background-color : #B32B3F ;
}
my code goes like this for setting the stylesheet in ASP.NET master page
HtmlLink link1 = new HtmlLink();
if (null != Request.QueryString["CID"])
{
clientId = Request.QueryString["CID"];
Session["CID"] = clientId;
link1.Href = "~/NewClientPortal/stylesheet.asp?CID=" + clientId;
}
else if (Session["CID"] != null)
{
clientId = Session["CID"].ToString();
link1.Href = "~/NewClientPortal/stylesheet.asp?CID=" + clientId;
}
else
{
//Going to default CSS
}
link1.Attributes["text"] = "text/css";
link1.Attributes["rel"] = "stylesheet";
Page.Header.Controls.Add(link1);
my stylesheet setup in web.config is <pages theme=""</page>
when i see the view source code when the page is rendered i see the <link>
element with the proper url............ but none of the style settings are
set to any of the controls................
Anyone has any idea....why this is happening.............need help badly