Find and Replace

  • Thread starter Thread starter Floyd Burger
  • Start date Start date
F

Floyd Burger

string convertedString = HttpUtility.HttpEncode(txtQuote.Text);
other than that, you could use a RegEx replace
 
It looks like your post of "How do I convert the < to < and > to >?"
got converted to its HTML entity translations on Google Groups since
they all "look" identical. The simple way is to use the string Replace
method. For example,


string s="It is unbelievable <a
href="http://sports.yahoo.com/sc/news?slug=reu-tourtrial_picture&prov=reuter

s&type=lgns">Armstrong is on <font color="red"FIRE</font></a>";

s=s.Replace("<", "&lt;");
 
HI,

I've same situation, (I'm a beginner in C#.)
I want to replace a PARAM value on every page load (or refresh).
my HTML code is something like this:

<form id="Form1" method="post" runat="server">
<OBJECT id="ShowLevel" classid="clsid:9F2B3505-199C-11D2-9E4E-00AA002156AE"
VIEWASTEXT>
<PARAM NAME="Level" VALUE="36">
...
</OBJECT>

I want to change VALUE to any integer, but with code behind (C#) only.
Please guide.

Regards,
Sachin M
 
Back
Top