[英]Getting Path of image in html image tag.so how can i get URL of image from <img> tag?
str = reImageAdd.Content; ;
// Grab just the "src" attribute containing your image
images = Regex.Match(str, "src=\"([^\"]*)\"").Groups[1].Value; // yields "http//www.abc.com/phoneimage.jpg"
首先將內容保存到字符串中。現在字符串str中包含類似的內容,然后使用第二個代碼塊,我們可以找到路徑和過濾器路徑並保存到另一個字符串中,這樣我們就可以將該字符串保存到數據庫中
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.