nishant ranjan

nishant ranjan

  • NA
  • 390
  • 0

render html with css applied to it inside aspx panel

Mar 5 2014 7:30 AM
in solution explorer, i have a folder named html
inside this folder i have two file 1.html and 1.css

in aspx page, i have a panel, inside panel i have a label into which i am rendering the html which contains few controls say
<html>
  <head>
<title> Hello </title>

 </head>
<body>

<table><tr>
<td>: <input type="text"  name="txtDateOfBirth" id="txtDateOfBirth" Width=250 Height=50></td></tr>
<tr>
<td>: <input type="text"  name="txtSal" id="txtSal" Width=250 Height=50></td></tr>

</table>
</body>
</html>

what i want is at runtime the css should be applied to these html control and not any other aspx control.

how i can do this.
can i render this html directly to panel without using label
 lblHtml.Text = System.IO.File.ReadAllText(Server.MapPath("~/HTML/1.html"));

how to apply css to this html so that when rendered to aspx page, it should have all those css applied to it.

kindly help