Hi I am trying to load a css file in c# code but it is not working.Please can someone help:
This is my code :
Css:
I have a css file called Style.css and below is the code in the file:
.vtabs { border-right: 1px solid #DDDDDD; display: block; float: left; min-height: 300px; padding: 10px 0; width: 190px; background-color:Black;}
Html:
<body>
<form id="form1" runat="server">
<div>
<asp:Literal ID="OrderInfoTab" runat="server"></asp:Literal>
</div>
</form>
</body>
C#:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string str = string.Format("<link rel=\"stylesheet\" href=\"{0}\" type=\"\">", HelperFunctions.GetAbsolutePath(this.Page, "css/Stylecart.css"));
OrderInfoTab.Text = str;
string TabHeader = string.Empty;
string TabDescription = string.Empty;
TabHeader += "<div class=\"vtabs\">";
TabHeader += string.Format("<a class=\"selected\">{0}</a>", Resources.Language.OrderDetails);
TabHeader += "</div>";
}
}