title: Showing image in WPF using the URL link from database
body: <p>i saved the URL in the database like this </p>
  
  <blockquote>
    <p>~/Images/Questions/drink.png</p>
  </blockquote>
  
  <p>So when i retrieve it in my WPF application i tried to do this :</p>
  
  <pre><code>            Image img = new Image();
              img.Width = Double.NaN;
              img.Height = Double.NaN;
  
      //      string fullFilePath = Path.Combine(@"C:\Users\apr13mpsip\Documents\Visual Studio 2010\Projects\iStellarMobile\iStellarMobile\Images\Questions", lstQuestion[i].ImageURL.Substring(1));
              string fullFilePath = @"C:\Users\apr13mpsip\Documents\Visual Studio 2010\Projects\iStellarMobile\iStellarMobile\Images\Questions\drink.png";
              BitmapImage bi = new BitmapImage();
              bi.BeginInit();
              bi.UriSource = new Uri(fullFilePath, UriKind.Relative); 
              bi.EndInit();
  
  
              img.Source = bi;
              wrapPanel1.Children.Add(img);
  </code></pre>
  
  <p>the lstQuestion[i].ImageURL is the URL that i retrieve from database. but it won't work ... it display nothing when i run it , so i tried the full path by typing in manually the whole directory but it still won't work , What have i gone wrong here?</p>
  
  <p>When i debug it , it only shows Images\Questions\drink.png instead of the full path </p>
  
  <p>When i use </p>
  
  <blockquote>
    <p>Path.Combine(@"C:\Users\apr13mpsip\Documents\Visual Studio
    2010\Projects\iStellarMobile\iStellarMobile",
    lstQuestion[i].ImageURL.Substring(1));</p>
  </blockquote>
  
  <p>, it says URL could not be determined and when i debug it , it only read as Images\Questions\drink.png instead of the full path.</p>