Page.ParseControl to find HTMLImage
<p>I have a richtext textbox on a webpage that will be used to create email templates. This textbox returns HTML as a string. I need to get the source of all the images from the HTML so that the images can be stored in the database. Once the HTML is returned the images have already been loaded to the server and the new path has been used as the source of the image.</p>

<p>I would like to parse the controls, loop through the controls as seen below, find the images save to the database and change the source to a new value.</p>

<p>However when the string is parsed, it always returns one literal control unless there is a runat server attribute assigned to the tag. If the run at server is present it correctly identifies the control as an HTMLImage control.</p>

<p>Is there away to get the page to parse all the controls regardless of if they are server controls? </p>

<pre><code>Dim s As String = "&lt;P&gt;&lt;IMG src=""http://localhost/MessageImages/14699666.jpg""&gt;&lt;/P&gt;"

Dim cnts As Control = Page.ParseControl(s)

For Each c As Control In cnts.Controls
   If TypeOf c Is System.Web.UI.HtmlControls.HtmlImage Then
        Dim src As String = CType(c, HtmlImage).Src
        'TODO: Save image to database
        'TODO: Change source 
   End If
Next
</code></pre>
