am getting errors in my code, kindly advice below are the required code
xaml
cs
private void Browse(object sender, RoutedEventArgs e)
{
SqlConnection cn = SqlConnection(global::DatabaseApp.Properties.Settings.Default.Database1ConnectionString);
try
{
OpenFileDialog dlg = new OpenFileDialog();
dlg.Filter = "JPG Files (*.jpg)|*.jpg|GIF Files (*.gif)|*.gif|All Files(*.*)|*.*";
dlg.Title = "Select Student Picture";
if (dlg.ShowDialog() == DialogResult.OK)
{
imgLoc = dlg.FileName.ToString();
picStu.ImageLocation = imgLoc;
}
}
catch(Exception ex)
{
System.Windows.MessageBox.Show(ex.Message);
}
}
Thank you

Ankur JainRank #2,475 · 567 reputationPosted Mar 31, 2015, 8:26 PM EDT
please have a look on following article...
http://www.redmondpie.com/how-to-save-and-retrieve-images-in-c-wpf-application-from-sql-server-database/
JOHN JOHNNNYRank #9,451 · 206 reputationPosted Apr 1, 2015, 12:49 AM EDT
Mageshwaran RRank #411 · 6.1K reputationPosted Nov 24, 2019, 7:18 AM EST