I am trying to replace one html tag with another using asp.net.
string html = rateNode.InnerHtml;
string newHtml =html.Replace("<dl>", "<tr>").Replace("</dl>", "</tr>");
but it only replace the second part that is
.Replace("</dl>", "</tr>");
it does not replace the first part. the first part is have class attribute. So i have also tried
string html = rateNode.InnerHtml;
string newHtml =html.Replace("<dl class='ui-attr-list util-clearfix'>", "<tr>").Replace("</dl>", "</tr>");
but failed. Please tell me what should i do for replacing the first part. Thanks in advance.
" which does not exists in your html variable...
– the_lotus Aug 24 '15 at 14:43