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
mounika madhavaram
NA
42
11k
How to upload multiple files in wpf using web client class
Sep 17 2018 7:35 AM
Hi I want to upload multiple files in wpf using web client class....
this is my xaml design and code
private void btnOpenFiles_Click(object sender, RoutedEventArgs e)
{
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Multiselect = true;
openFileDialog.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*";
openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
if (openFileDialog.ShowDialog() == true)
{
foreach (string filename in openFileDialog.FileNames)
lbFiles.Items.Add(System.IO.Path.GetFileName(filename));
}
}
this is xaml design
<DockPanel Margin="10">
<WrapPanel HorizontalAlignment="Center" DockPanel.Dock="Top" Margin="0,0,0,10">
<Button Height="60" Width="50" Name="btnOpenFile" Click="btnOpenFiles_Click">Open files</Button>
</WrapPanel>
<ListBox Name="lbFiles" Height="80" />
<Button Height="50" Width="80" Name="btnUploadFile" Click="btnUploadFiles_Click">Upload files</Button>
</DockPanel>
am able to select multiple files...again how to send all the selected files to the server .
Thanks in Advance
Reply
Answers (
2
)
WPF Application Image Post on Facebook
In upload docume method I need to use web client class