I am in the process of creating a method that will generate a list of web parts on a specific page. I have found that using the
SPLimitedWebPartManager class will help me with the task. When I use the class i receive an error saying
The type or namespace name 'SPLimitedWebPartManager' does not exist. So, I add the Namespace for the class
Microsoft.SharePoint.WebPartPages. Doing this causing an ambiguous error on my main class
public partial class VisualWebPart1 : WebPart. The
WebPart is the bit that receives the error. When i comment out the Namespace
System.Web.UI.WebControls.WebParts the ambiguous error goes away. Now, when i reload my page i get an error saying
<style xmlns=''> was not expected..
Now, my question(s).
Why can't I use both namespaces? I realize i can't because of the ambiguous error. but must be a good explanation
Why am I receiving this
<style xmlns=''> was not expected. error? Steps to remove it?
Is there one namespace that will take care of both classes and not give me the
<style xmlns=''> was not expected. error?