with a new Empty website application
i would like to apply a style to the aspx Page via a fie that holds some custom values of css attributes ,i am not sure which is better approach.
i am still testing the concept , i have a file that holds those values :
width;100px width;130px background-color;#aac93f
these values are not hardcoded but generated by another application
and i would like to read it into the application .
i could think of the only two ways i know :
`File.ReadAllLines` or `File.ReadAllText`.
then through code behind set the html elements style properties via proccessed data
htmltag.Style.Add("width", setting1)....etc
OR
I could also load style sheet from dynamic /programmatic data
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<!-- and put a C# server code like below -->
<%=someVariableOrCsMethodReturnedValue%>
</head>
so that will hold a formatted style with the loaded values.
is that the way to load custom values for css style ?