Sir/Madam
How to use open file dialog in asp.net..
With Regards,
Gomathi.P
Open file dialog
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
ShankeyRank #972 · 2.1K reputationPosted Sep 1, 2010, 12:36 AM EDT
OpenFileDialog oDlg = new OpenFileDialog(); oDlg.Title = "Select TXT"; oDlg.Filter = "TXT (*.Txt)|*.txt"; oDlg.RestoreDirectory = true; string dir = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); oDlg.InitialDirectory = dir; DialogResult result = oDlg.ShowDialog(); if (result == DialogResult.OK) { lblSourcetxt.Text = oDlg.FileName; }