Last post Aug 09, 2016 01:51 AM by Nan Yu
Aug 08, 2016 06:35 AM|Binumon003|LINK
In my application i need to upload one html file. But if html file containing <head> and <script> tag i need to remove from file. How i achieve this in c#
Aug 08, 2016 08:58 AM|Nan Yu|LINK
You could try to use HTML Agility Pack , and you could refer to below link for code sample :
Aug 08, 2016 09:50 AM|Binumon003|LINK
HI Nan Yu,
Thanks for your support. i implemented link you provided. Thing is that that removing only script tag. How remove head also?
Aug 09, 2016 01:51 AM|Nan Yu|LINK
How remove head also?
You could try below code :
HtmlNode head = doc.DocumentNode.SelectSingleNode("/html/head");