.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Code Snippets >> ASP.NET Controls >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Open Dialog Box in C#

Posted By:Suderson Sarathy       Posted Date: November 22, 2010    Points: 15    Category: ASP.NET Controls    URL: http://www.dotnetspark.com  

This code describes the open dialog feature in C#

File Upload is not available in Windows App C3. So, a look alike of a Fileupload is been created and the code is been attached.
opendlg.Title = "Add Excel File";
opendlg.Filter = "Microsoft Office Excel 97-2003 Worksheet (*.xls) | *.xls*";
opendlg.FileName = "";
opendlg.AddExtension = true;
opendlg.CheckFileExists = true;
opendlg.CheckPathExists = true;

if (opendlg.ShowDialog() == DialogResult.Cancel)
opendlg.FileName = "";

sFilePath = opendlg.FileName;
if (sFilePath == "")


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend