- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
B"> 我知道以下工作,但我想使用 RadioButtonList 而不是 -6ren">
如何向 RadioButtonList
添加超链接?
我尝试了以下方法,但它仍然呈现为纯文本。
<asp:RadioButtonList runat="server" id="rdlTest">
<asp:ListItem Value="1" Text="<a href='Page2.aspx?1'>A</a>"></asp:ListItem>
<asp:ListItem Value="2" Text="<a href='Page2.aspx?2'>B</a>"></asp:ListItem>
</asp:RadioButtonList>
我知道以下工作,但我想使用 RadioButtonList
而不是 RadioButton
。
<asp:RadioButton runat="server" ID="rdoTest" Text="<a href='Page2.aspx?1'>A</a>" />
更新
一些其他代码搞砸了。所以我的原始代码没有问题。我有一个函数可以使用 rdl.Items.Add(new ListItem("1","A")
在 Page_Load
清除和重新加载 rdlTest,这会覆盖工作标记。
最佳答案
你就不能做一些像...
<asp:CheckBoxList ID="chk" runat="server">
<asp:ListItem Value="0"><a href="http://www.asp.net">asp.net</a></asp:ListItem>
<asp:ListItem Value="1"><a href="http://forums.asp.net">forums.asp.net</a></asp:ListItem>
</asp:CheckBoxList>
RadioButtonList 和 CheckBoxList 的工作方式应该相似。
关于c# - 将超链接添加到 RadioButtonList,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12502098/
出于好奇,任何人都知道内部实现的细节 ListControl.SelectedIndex = (int) 对比 ListControl.SelectedValue = .ToString() 我在使
首先,repeater with in a repeater可以用吗?如果是,我将如何在以下场景中使用嵌套中继器。
我创建了一个包含 2 个选项的选项列表:是和否,如下所示 radioButtonList($model,'active', array(1=>'Yes', 0=>'No'), array('separ
我有一个 ASP RadioButtonList,我想在客户端处理它。 该网页包含一个带有单选按钮组和关联的 GridView 的表单。当用户选择单选按钮之一时,我想隐藏或显示 GridView 上的
我有一个RadioButtonList,有两个选项:完整和部分。默认选择已满。 Full Partial 我还有一个 jquery 函数,它会导致某些元素在选择“部分”时隐藏,并
如何向 RadioButtonList 添加超链接? 我尝试了以下方法,但它仍然呈现为纯文本。 A"> B"> 我知道以下工作,但我想使用 RadioButtonList 而不是
我有一个单选按钮列表,其中包含更新搜索功能的 selectedindexchanged 事件。其中一项在 aspx 中指定,其他项是附加的数据绑定(bind)项。无论我将什么设置为默认值,该项目都不会
我正在 ASP.net 中创建一个注册 Web 表单,但在客户端发送空字符串,因为我选择了一个选项,其背后的原因是什么以及如何获得非空字符串。 这是我的 RadioButtonList 代码。
当我们在文本框中输入时,我需要使单选按钮列表可过滤。意思是如果我输入 M 然后应该显示 Music & Movie radio 。我想用 JS 或 jquery 来避免回发。我对他们两个都不太了解。
我想要一个单选按钮列表,您可以在其中选择值 null。 是这样的: '> RW R None 非常感谢,文森特 最佳答案 单选按钮
我有一个 DataList,它显示一些带有 RadioButtonList 的帖子,其中包含从 1 到 5 的 5 个选择,但是当我尝试获取 theRadioButtonList 的选定值时,它抛出空
我在 Web 表单上有一个 RadioButtonList 和一个提交按钮。当我单击具有空 RadioButtonList 值的提交按钮时,即没有从 RadioButtonList 中选择任何内容,我
我正在系统后端创建一个单选按钮列表。有什么方法可以让我以随机顺序显示项目吗? 我的代码: c# RadioButtonList1.Items.Add(New ListItem(rsQuestio
我正在寻找处理在 ASP.net RadioButtonList(后面的 C# 代码)上选择的索引更改的最佳方法。我有 3 个列表项。对于第一个,我希望它在页面上显示一个隐藏的 asp:textbox
基本上,我只想要 RadioButtonList 上没有单选按钮,我将对 rbl 进行编码,以便所选项目具有不同的背景颜色并使其看起来更专业,我希望能够摆脱单选按钮本身外观......如果你知道任何方
我有一个单选按钮列表,我需要在一些值之间添加标签。 我知道以下内容行不通,但这是我想在 .net 中执行的操作的最佳示例。 Regular
无论我在单选按钮列表上设置什么,它仍然呈现一个无序的垂直列表。 最佳答案 如果您碰巧正在使用 Sitefinity(就像我一样)
aspx 文件: ' DataSource='' Da
当我单击 ASP.NET 页面上的按钮控件时,我的单选按钮列表在回发后未选中地返回。
我似乎无法将 RadioButtonList 居中放置在面板中。它似乎总是有道理的。不管我怎么努力。 我目前的代码是:
我是一名优秀的程序员,十分优秀!