Hi guys, i'm trying to fetch details of images from a folder like their name and path and i want to save these details in an xml format. can anybody give me some sample code on how to write those details to xml? and then fetch those details on page_load? i just need the xml part.. im stuck. please help. Thanks in advance.
Hi pete,Thanks for the reply. I tried doing that but i'm getting an error. I forgot to mention that i'm trying to do this in a metro app. That is win 8 consumer preview with vs 2011 exp beta. Here is my code. Can u tell me what changes should i make?
//Get file names from folder
StringBuilder output = new StringBuilder();
StorageFolder folder = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFolderAsync("Big");
IReadOnlyList<StorageFile> file = await folder.GetFilesAsync();
string r= file.Count.ToString();
// int i=file.Count;
foreach (StorageFile file1 in file)
this.one.Text = output.ToString();
XElement xml = new XElement("Images",
from file1 in file
select new XElement("Image",
new XElement("Filename", file1.Name),
new XElement("FileSize", file1.Size)
when i run this im getting an error in " xml.save("Data.xml");"
Error1 The best overloaded method match for'System.Xml.Linq.XDocument.Save(System.IO.Stream, System.Xml.Linq.SaveOptions)' has some invalid arguments
Error2 Argument 1: cannot convert from 'string' to 'System.IO.Stream'
You can do following:
1. Create a class with all the properties which you want to save in an XML file.
2. Fetch the details of images from a folder and store it in an object of this newly created class.
3. And then with few lines of code, you can convert this object into XML
At my company we are using excel to register our working hours. I created a very intelligent xls file but because some people use open office i had to remove a lot of it. Now that means that the HR person needs to do a lot of work entering the data from the basic excel sheet to my intelligent work sheet so the calculations are done for her.
For the moment i am trying to create an Excel Add-in using vb.net to do this.
The purpose of the add-in is to import the data from the basic to the intelligent sheet. but i seem to have run in to a problem:
How can i write data into the current XLS file. normally you open the file using code but because it is an excel add-in the file is already open in excel. So how can i use the current open file
Hello all .Net Addicts, seekers, masters and developers
first of all i want to avail the chance to say that i'm very glad now i'm in the .Net world and now that i'm capable to develop under Visual Studio, and as a student, software developing and programming is the best field out there. and now that i'm continuing my engineering studies i need to implement an application for my final project assignment..
and for that purpose i'm looking to create a WPF/WCF chat application that allows the following functionalities :
- communication via lan
- chatting via text, video(webcam) and audio
- exchange files
- save conversation logs
i'm seeking your help to achieve the implementation of this application, so please if there is any samples that i can follow i'll be glad to hear you.
ps: i've already implemented the chat application in this article. WCF / WPF Chat Application[^]
any help would be more than appreciated !!
I write as a novice and happen to own Visual Studio. I have been asked about a business programming language... XBRL which is extensible business reporting language. Can Visual Studio understand XBRL so that applications can be written? Much thanks for an informed reply.