【问题标题】:Iframe style code behind C#C# 背后的 iframe 样式代码
【发布时间】:2013-05-12 07:33:48
【问题描述】:

我正在尝试设置每个按钮来控制 c# 中 iframe 的样式。 HTML代码如下

style="border: 0px none; margin-left: -185px; height: 100%; margin-top: -533px; width: 100%;">

我的 C# 代码为

IFrame.Attributes.Add("style", "height: 100%, Margin-top:-533px, margin-left: -185px, width: 100%,");

问题是 C# 的行为不像 HTML,如何修改 C# 代码以使其行为像 HTML?请帮忙。

【问题讨论】:

    标签: c# html code-behind


    【解决方案1】:

    你为什么不这样做:

    IFrame.Attributes["style"] = "border: 0px none; margin-left: -185px; height: 100%; margin-top: -533px; width: 100%;";
    

    【讨论】:

      猜你喜欢
      • 2015-04-13
      • 2016-02-22
      • 2010-09-18
      • 1970-01-01
      • 2014-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多