locked
how to retrive pdf from entity frame work. RRS feed

  • Question

  • Hi ,

    I  have pdf file in my sql server Db. I want  query table and  get pdf into aspx page.

    How do we query byte data  i.e pdf and display it in aspx page.

     

     

    Friday, January 13, 2012 5:36 PM

Answers

  • Hi priya2silverlight,

    Welcome to MSDN Forum.

    Query the filed in database by Linq to Entities, here's a simple sample. I assume the table named myTable and the byte type filed named pdf. the query can be this,

    var query = from record in context.myTable select record.pdf;
    

    then you can get a collection which contains the byte type data. About how to display it at aspx page, I suggest you to ask in ASP.NET Forum, you may get more help there.

    Best Regards


    Allen Li [MSFT]
    MSDN Community Support | Feedback to us
    • Proposed as answer by Veysel Ugur KIZMAZ Monday, January 16, 2012 9:52 PM
    • Marked as answer by Allen_MSDN Thursday, January 19, 2012 2:03 AM
    Monday, January 16, 2012 6:26 AM