title: How to read binary data from SQL Server and display in browser
body: <p>I have binary data in my SQL Server, I want to read that binary data and display in browser as this binary data is a PDF file - how can this be done?</p>
  
  <p>Here is my database structure:</p>
  
  <p><a href="https://i.stack.imgur.com/Rid59.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Rid59.png" alt="database"></a></p>
  
  <p>I am retrieving other data from database successfully as shown in this screenshot:</p>
  
  <p><a href="https://i.stack.imgur.com/KM2RF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KM2RF.png" alt="data"></a></p>
  
  <p>What I want is when user click on view button, binary data from database should read and display new webview</p>
  
  <pre><code>        &lt;ListView.ItemTemplate&gt;
  
              &lt;DataTemplate&gt;
                  &lt;ViewCell&gt;
                      &lt;StackLayout Orientation="Horizontal" Padding="12,6"&gt;
  
                      &lt;Label Text="{Binding ReportName}" FontSize="24" 
                 Style="{DynamicResource ListItemTextStyle}" /&gt;
  
                      &lt;Label Text="{Binding Date}"  FontSize="18" Opacity="0.6"
                 Style="{DynamicResource ListItemDetailTextStyle}"/&gt;
  
                      &lt;Button Clicked="ShowPDF" Text="View" CommandParameter="{Binding FileContent}"&gt;&lt;/Button&gt;
                      &lt;/StackLayout&gt;
                  &lt;/ViewCell&gt;
              &lt;/DataTemplate&gt;
          &lt;/ListView.ItemTemplate&gt;
  
      &lt;/ListView&gt;
  </code></pre>