The below code replaces the #Name# with myname and implement for other things also
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim str As String = "tr> <d>#Name#</td><td>#Department#</td><td>#Designation#</td> </tr> "
Dim replacedStr As String = System.Text.RegularExpressions.Regex.Replace(str, "#Name#", "MyName")
End Sub