Good People,
I have the following problem:
When trying to replace
of a string (of a Literal Control
), using the following code, the value of the same does not change.
MyControl.Text.Replace("id=\"KP\"", "id=\"KPC\"");
However, if I try to change only the value of id
(as the following code shows), it works perfectly.
MyControl.Text.Replace("KP", "KPC");
Q: I have to use the id no replace, because the text of literal
contains more than once the reference to the value of id
.
[EDIT] - I leave here an excerpt of literal
for better understanding (it's repetitive)
<li><a class="fancybox" title="BK-001" href="imgpeles/KP-01.jpg" rel="fancybox">
<img alt="" src="imgpeles/KP-01_t.jpg" width="55" height="55" id="KP-01"><br>
BK-001</a>
</li>