如何在控件中显示图像,pdf,docx [英] how to show image ,pdf,docx in a control
本文介绍了如何在控件中显示图像,pdf,docx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
haii ...
我有一个问题,当我上传文件(image,.doc,.pdf)时,我想在div或从保存图像并保存pfd,doc的文件夹中的任何控件中查看该文件.但是我正在使用asp:image控制..so我只能看到上传的图片.任何人都可以建议同时包含图像和pdf,doc文件的任何控件..这是我的代码和源代码..
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..
<div id="dashboard1">
<asp:Image ID="imgByeLaw" runat="server" CssClass="ImageForByelaw" />
</div>
代码
----
code
----
if (dsGetProjectById.Tables[0].Rows[0]["ByeLawFile"] != "")
{
imgByeLaw.Visible = true;
imgByeLaw.ImageUrl = "~/ByeLawFiles/" + dsGetProjectById.Tables[0].Rows[0]["ByeLawFile"].ToString();
}
推荐答案
您可以在图像控件之后添加另一个富文本框控件,并在上传doc文件后,阅读所有文本和显示在文本框中.
希望对您有帮助
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
这篇关于如何在控件中显示图像,pdf,docx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文