atributtes

Topics: User Forum
Oct 4, 2011 at 2:59 PM

i have this code in csharp but i'm getting an error on the line:

object val = el.Attributes("value").Value;
Error 1 Non-invocable member 'HtmlAgilityPack.HtmlNode.Attributes' cannot be used like a method.
 how to fix it?
string pageUrl = "site1"; //hidden site

            HtmlAgilityPack.HtmlWeb hDoc = new HtmlAgilityPack.HtmlWeb();
            var doc = hDoc.Load(pageUrl);

            //find the div containing the flash code 
            var div = doc.DocumentNode.SelectSingleNode("//div[@id='animador_noar']");
           
            
            
            //find the params node with the name 'movie' 
            var el = div.SelectSingleNode("//param[@name='movie']");
            
            //find the value of the value tag 
            object val = el.Attributes("value").Value;
           
           
             

            //do something with the value. 
            Response.Write(val);