Dilip Solanki

Dilip Solanki

  • NA
  • 72
  • 15k

Setting Up CSS on any DIV using C#

Jan 13 2013 3:29 AM
Good Afternoon Friends..
I want to apply stylesheet dynamically on <div>, which i have created in design time.
I have only 1 .aspx webpage, which i have created in visual studio 2010.
My default.aspx page code as below:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!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"> 
 <title></title>
 </head>
 <body> 
 <form id="form1" runat="server">
 <div id="testing"> 
</div>
 </form> 
</body> 
</html>
 
Now i want to apply stylesheet on above div with  "testing" id.

I want to apply these stylesheet properties with div:
background-color
border
width
height
font

I have did this task by using javascript but now i want to do this using c#.
How can i do it, plz help me...?

Answers (1)