TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sachin Kadam
NA
11
37.5k
How to get full path of selected file from OpenFileDialog ?
Sep 9 2011 9:22 AM
hi,
i want to get path of selected file using OpenFileDialog,
but its shown "File operation not permitted. Access to path is denied." error.
I have user following code and want to display full path in text box
OpenFileDialog dlg = new OpenFileDialog();
dlg.Multiselect = false;dlg.Filter = "Video Files (*.mp4)|*.mp4|Video Files (*.mpeg)|*.mpeg|Video Files (*.wmv)|*.wmv";
dlg.FilterIndex = 1;
bool? retval = dlg.ShowDialog();
if (retval != null && retval == true)
{
UploadVideo(dlg.File.Name, dlg.File.OpenRead());
//string filePath = Path.GetDirectoryName(dlg.File.Name);
txtVideoPath.Text = dlg.File.Name;
}
Any idea how to get full path?
Reply
Answers (
4
)
Silverlight Instalation problem with vs08
Display uploading progress bar