【发布时间】:2014-12-28 16:52:04
【问题描述】:
如何在c#中获取bbcode文本中的第一个图像墨迹
我将此代码用于 html,但如何为 bbcode 执行此代码
HtmlDocument document = new HtmlDocument();
document.LoadHtml(Model.TextSujet);
var imageUrl = (from image in document.DocumentNode.Descendants("img")
where !String.IsNullOrEmpty(image.GetAttributeValue("src", null))
select image.Attributes["src"].Value).FirstOrDefault();
【问题讨论】:
-
对不起,我没有正确阅读问题,感谢您指出@codemonkey
标签: c# asp.net-mvc entity-framework bbcode