-3

I have a html text like that:

string htmltext="<p style="text-align: left;" align="center"><img src="../image/1.jpg" alt="" width="310" height="162" /></p>";

And i want to find only src value (../image/1.jpg) from this string. help me please.

davut temel
  • 69
  • 1
  • 9

1 Answers1

0

ASPX:

<p style="text-align: left;" align="center">
 <img src="../image/1.jpg" alt="1" id="myImage" width="310" 
   height="162" runat="server" />
</p>

CODE-BEHIND:

string src = myImage.Src;

Making Sense of ASP.NET Paths

Nisse Engström
  • 4,738
  • 23
  • 27
  • 42
IrishChieftain
  • 15,108
  • 7
  • 50
  • 91