Few days back, I was working to create an Editor Web Part. The Editor Part contains a drop down and I need to populate it with an XML file (Links.xml) . I had given the file name in XmlDatasource, considering it would be picked, but Editor part gave me an error i.e. file not found.
After doing some research, I came to know a new deployment type ElementFile. This deployment type physically deploy the file along with the feature and we can get the path of the feature then.
SharePoint provides a method for this purpose i.e.. SPUtility.GetGenericSetupPath. By using this method I found my XML file and me editor part started working. I hope this will help any other newbie in SharePoint..... :)fF

No comments:
Post a Comment