sir,
on link button i am converting pdf file to download that saved in database, but it showing error as : Unable to cast object of type 'System.String' to type 'System.Byte[]'.
below is code:
Dim filename As String = Session("appno").ToString() & "SitePlan"
Response.Clear()
Response.Buffer = True
Response.ClearContent()
Response.ContentType = "application/pdf"
Response.BinaryWrite(DirectCast(Session("construction_siteplan"), Byte()))
Response.AddHeader("content-disposition", (Convert.ToString("attachment;filename=") & filename) + ".pdf")
Response.Charset = ""
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.Flush()
Response.[End]()