I have a custom menu control that's content is read from the physical path of an XML file. What I need to do is first write the xml to this physical location path then load the menu's XmlPath(Menu1.XmlPath = @"C:\temp\MenuData.xml"). How can I do this in a WebPart?
add this xml into the layouts mapped folder and then in your web part read the xml. It will solve the permission issues on reading the physical file from some other folder and easy to package and distribute across your multiple wfe servers.
We really need to get you into thinking in terms of document libraries instead of touching the 14 hive. This is what you will also do with your images, Silverlight web parts, and much more. Document libraries are more than just ftp over http. They are file storage for applications as well. Here is a code sample blog for reading xml into a web part. http://www.jdxyw.com/?p=631[^]
Great example for reading a library document but what I need to do is open my template menu.xml file, then modify the xml with the new menu data, then write it back to the source (library document), then finally set it as the source for my custom menu control contextMenu.xmlPath = "libraryFile.xml". Is this possible or am I missing something. I am new to SP and still a little lost.
I am up against a couple of deadlines for grad school and work at the same time. Here is what I can tell you fast. What you want is possible. I would setup the coding research tasks as follows: code doc lib url as property of web part (this gives you a flexibility for where doc lib can be--not hard coded). Rt click on doc in lib get url directly to item in library. http://zimmergren.net/technical/how-to-custom-web-part-properties-toolpart[^]