I am trying to use c# to find an html element however I am struggling with the escape characters. My code below is taking an html and trying to find an element within it however start is not returning the IndexOf. What am I doing wrong?
//html im trying to find <table cellspacing="0" cellpadding="0" class="cbParent" summary="Results from your search" id="searchResultsTbl">
string table = "<table cellspacing=\"0\" cellpadding=\"0\" class=\"cbParent\" summary=\"Results from your search\" id=\"searchResultsTbl\">";
int start = html.IndexOf(table);
You can use single quotes in place of double quotes
Explanation:
Html attributes may have single quotes
' 'or double quotes" "