0

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#?

1 Answer 1

1

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";
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.