Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
3
Reply
Filename is empty in SaveDialogue
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Yoko Yoko
9y
506
1
Reply
I am trying to save a xml file generated in the code using Savedialogue.
I have given the following code in my click button command.
var saveDialog = new Microsoft.Win32.SaveFileDialog()
{
Filter = "Loan Parameters(*.xml)|"
};
if (saveDialog.ShowDialog() == false)
{
return;
}
// XML Serialization and Binary Encoding
byte[] buffer = LoanDataHelper.SerializeModel(loanParameterValueConfig);
if (buffer != null)
{
LoanDataHelper.WriteStreamToFile(buffer, saveDialog.FileName, LoanDataHelper.FileFormat.Normal);
}
I am using mvvm model .On running I am getting exception as filename is not getting the value that I am passing in the savedialogue window.It is always empty string.
I could not figure out what i am missing here.
Please help.
Thanks in advance
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
WPF-Radio button and checkbox validation using if statements
[WPF] Grid: set height * of row from Code Behind