0

我有一个 ASP.net 页面,其中包含控件内部的动态内容,其中一些是自定义控件,其中一些是常规 ASP.net 控件。

有没有办法在选取框内获取这些控件?也许是 HTML 字幕?这些控件大多是在这个意义上构建的:

一些文本


一些文本


一些文本

等等

谢谢!

4

5 回答 5

1

您应该考虑使用 jQuery。Marquee 标记已被弃用,并且不适用于所有浏览器。

于 2010-07-07T07:27:40.320 回答
0

我正在尝试在项目的母版页中使用选取框标签。这是代码。得到明显的错误,用谷歌搜索,但找不到解决方法。

<pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"><code>&lt;marquee style=&quot;color:#663300; font-weight:700; font-size:medium; width:877px; height:22px;
            margin-top:0px; position:relative; top:-3px; left:-73px; margin-left:0px;&quot;&gt;  Welcome ... &gt;To Narsingham Page
           &lt;/marquee&gt;

</pre>

有什么办法,我可以在我的 vs2010 项目中使用 xhtml1.0 中的相同选框。我尝试了卢克的方法,但它不起作用。是否有必要在这个 senario 中使用 jquery。我发现这个 html 控件很容易,因为我对 jquery 没有太多把握。

注册;\j

于 2011-09-19T17:04:16.863 回答
0
Literal marquee = new Literal();
marquee.Text = "<marquee style=color:#663300; font-weight:700; font-size:medium; width:877px; height:22px; margin-top:0px; position:relative; top:-3px; left:-73px; margin-left:0px;> Welcome ... >To Narsingham Page </marquee>";
this.Controls.Add(marquee);

将上面的代码放在Page_Load你的项目中,然后你就可以得到你想要的。

于 2013-10-11T16:20:06.420 回答
0

我最终这样做了:

<asp:Literal id="Literal1" text="<marquee>"></asp:Literal>
some controls
<asp:Literal id="Literal2" text=</marquee>"></asp:Literal>

这与 Luke 给出的解决方案非常相似,但您不能在 asp.net 页面中仅将其用作常规 HTML。

于 2010-07-07T13:20:32.870 回答
-1

你有没有尝试过:

<marquee> <asp:YourUserControl ... /> </marquee>
于 2010-07-07T07:25:28.347 回答