gpt4 book ai didi

c# - 如何增加文本控件 Asp .net 的宽度

转载 作者:行者123 更新时间:2023-11-28 12:48:05 26 4
gpt4 key购买 nike

我在数据库中存储和检索了 pdf 文件,为了展示这一点,我使用了 Literal 控件

.aspx代码

 <div >
<asp:Literal ID="ltEmbed" runat="server" />
</div>

.cs代码

ltEmbed.Text = string.Format(embed, ResolveUrl("~/FileCS.ashx?Id="), id);

输出

enter image description here

问题陈述

我想像全屏一样增加文字控件的宽度

我试过了

<div style="width:2000px;" >

但无法显示完整尺寸的 pdf。

最佳答案

我得到答案 我在 .cs 代码中使用它

    int id = Convert.ToInt32(Request.QueryString["id"]);
string embed = "<object data=\"{0}{1}\" type=\"application/pdf\" width=\"100%\" height=\"600px\">";
embed += "If you are unable to view file, you can download from <a href = \"{0}{1}&download=1\">here</a>";
embed += " or download <a target = \"_blank\" href = \"http://get.adobe.com/reader/\">Adobe PDF Reader</a> to view the file.";
embed += "</object>";
ltEmbed.Text = string.Format(embed, ResolveUrl("~/FileCS.ashx?Id="), id);

关于c# - 如何增加文本控件 Asp .net 的宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24651440/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com