Reputation: 2832
I have an HTML table in asp.net with placeholder tags, like #value1# and #value2#. The tags are currently the text in the <td>
element.
In C# I would like to replace these text with values that I calculate from code. What is the best method to replace the HTML tags from C#?
Upvotes: 0
Views: 1579
Reputation: 45083
Make the placeholders Literal
controls and output the value to the Text
property:
<asp:Literal runat="server" ID="PlaceHolder1" />
PlaceHolder1.Text = "content that would replace placeholder text";
Upvotes: 1