I'm trying to manipulate an ASPX file via Linq to XML, but when I try to load the ASPX file using XDocument.Load(), it throws up the "Name cannot begin with the '%' character" exception, obviously because of the <%@ Page %> directive.
Is there anyway to have Linq ignore that line or something? I'm noticing that ScottGu's tutorial also uses XDocument.Load() to load an aspx file, but I don't see anything in his code that might prevent the % exception.
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.