Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
haii...

I have a problem , when I upload a file (image,.doc,.pdf) ,I want to see that file in div or any control from a folder that I save image and pfd,doc.but I am using asp:image controls..so I can see only images that I upload . Can anyone suggest any controls that hold both images and pdf,doc file.. here is my code and source code..



XML
<div id="dashboard1">
  <asp:Image ID="imgByeLaw" runat="server" CssClass="ImageForByelaw" />

</div>


code
----

C#
if (dsGetProjectById.Tables[0].Rows[0]["ByeLawFile"] != "")
             {
                 imgByeLaw.Visible = true;
                 imgByeLaw.ImageUrl = "~/ByeLawFiles/" + dsGetProjectById.Tables[0].Rows[0]["ByeLawFile"].ToString();
             }
Posted

1 solution

You can add another Rich text box control after the image control, and after uploading the doc file, Read all it's text and show in the textbox .

Hope it helps
 
Share this answer
 
Comments
aravindnass 25-Nov-12 1:56am    
hey... is any example ? plz..
Pro Idiot 25-Nov-12 2:03am    
To extract text from a doc file
http://stackoverflow.com/questions/1011234/how-to-extract-text-from-ms-office-documents-in-c-sharp
aravindnass 27-Nov-12 5:32am    
hai..Pro Idiot ..I am a beginner ...So I can't understand ..plz give another solution..
for display images,pdf,docx in one control

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900