Code to add background color or background image:-
Frontend:-
<html>
<head>
<title></title>
</head>
<body id="bgBody" runat="server">
</body>
</html>
C#
apply in any method:-
// Background color code
bgBody.Attributes["bgcolor"] = "#cc0000";
//background image code
bgBody.Attributes.Add("background", "images/fullbg.jpg");
Frontend:-
<html>
<head>
<title></title>
</head>
<body id="bgBody" runat="server">
</body>
</html>
C#
apply in any method:-
// Background color code
bgBody.Attributes["bgcolor"] = "#cc0000";
//background image code
bgBody.Attributes.Add("background", "images/fullbg.jpg");
Comments
Post a Comment