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
Harto
NA
42
0
Getting the file extension.
Dec 9 2008 5:26 PM
I have this problem, consider working on a file called "this.is.a.test.only.txt"
- When the folder options is set to show the extensions of files, the dialog gets "txt" as the extension and which is ok.
- When the folder options is set to hide the extensions of known file types, the dialog gets "only" as the extension which is not what i want. As if it considers the last visible dot to be the one for the extension.
here is a part of the code where i'm experiencing the problem.
-------------------------------
private void btnTarget_Click(object sender, EventArgs e)
{
SaveFileDialog sdlg = new SaveFileDialog();
sdlg.CheckPathExists = true;
string fn = FileManager.GetRealFileName(this.txtOpen.Text);
sdlg.Filter = " |*" + Path.GetExtension(fn);
sdlg.DefaultExt = Path.GetExtension(fn);
sdlg.FileName = fn;
}
----------------------------------------------------
Is there any way where i can solve this one?
I appreciate your help
Reply
Answers (
1
)
Game System Compatilibity
Convert CS. FILE 2 GUI