Hi coders3,
Check this example. Now please take its reference and correct your code.
HTML file
<!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>
<title></title>
</head>
<body>
<table>
<tr>
<td>
Id
</td>
<td>
Name
</td>
</tr>
<tr>
<td>
1
</td>
<td>
John Hammond
</td>
</tr>
<tr>
<td>
2
</td>
<td>
Mudassar Khan
</td>
</tr>
</table>
</body>
</html>
HTML
<asp:TextBox runat="server" ID="txtDetails" TextMode="MultiLine" Height="300px" Width="400px" />
Code
C#
protected void Page_Load(object sender, EventArgs e)
{
string contents = System.IO.File.ReadAllText(Server.MapPath("~/Test.htm"));
txtDetails.Text = contents;
}
VB.Net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim contents As String = System.IO.File.ReadAllText(Server.MapPath("~/Test.htm"))
txtDetails.Text = contents
End Sub
Screenshot