So Now I will show how to achieve this. I will save a Content Editor Web Part which is showing the data from a text file which is available in one document liberary. Here are the steps for doing this:
1. Go to SharePoint Designer 2010 and inser a Content Editor Web Part.
2. Select the Web Part and go to Web Part Tools and Format. There we have two options to Save the Web Part.
If we save the Web Part in the Site Gallery this will save the web part in the Web Part Gallery else we can save this web part into a file which can be uploaded later to another gallery. I will select the Site Gallery Option.
3. This will prompt a dialog box where we can specify the name for this Web Part and the description. Also we can set the propery for this Web Part.
4. I have uploaded a text file in one of the document libraries and I will point my content editor web part to this text file using this Set Propertied button:
If we select No, the Web Part will show data from the list at the path validation, relative to the site in which it is used. So we can use this web part in any site having a list called Validation. With this this saved Data View Web Part can be resued in multiple environments.