以编程方式在浏览器中打开xml [英] open xml in browser programetically
本文介绍了以编程方式在浏览器中打开xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在文件夹中有一个xml文件..当我点击一个按钮时,我直接在浏览器中打开该xml文件...我写的代码虽然不起作用。
请建议我做什么
// XmlTextReader rd;
// if(File.Exists(strFilename))
// // rd = new XmlTextReader(fsVideos);
//其他
// {
// //fsVideos.Close();
// Console.WriteLine(未完成);
//}
// //Console.ReadLine();
解决方案
这个怎么样?< br $>
Process.Start(IExplore.exe,fileName);
< blockquote> iexplore
Process.Start( iexplore , file:// C:/Folder/filename.xml);
Process.Start( iexplore, @ C:\Folder\filename.xml);
Firefox
Process.Start( firefox , file:// C:/Folder/filename.xml);
Chrome
Process.Start( chrome, file:// C:/Folder/filename.xml 跨度>);
Hi,
I have an xml file in a folder..when I click a button I nned to open that xml file in a browser directly...I wrote the code though it is not working.
Please suggest me what to do
// XmlTextReader rd; // if (File.Exists(strFilename)) // //rd = new XmlTextReader(fsVideos ); // else // { // //fsVideos.Close(); // Console.WriteLine(" not done"); // } // //Console.ReadLine();
解决方案
What about this?
Process.Start("IExplore.exe", fileName);
iexplore
Process.Start("iexplore", "file://C:/Folder/filename.xml"); Process.Start("iexplore", @"C:\Folder\filename.xml");
Firefox
Process.Start("firefox", "file://C:/Folder/filename.xml");
Chrome
Process.Start("chrome", "file://C:/Folder/filename.xml");
这篇关于以编程方式在浏览器中打开xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文