[英]How can I get a space in “Text: ”“ ” inside of a asp.net tag
<asp:RadioButtonList ID="RadioButtonListGutscheinArt" Visible="true" runat="server">
<asp:ListItem ID="ListItemZugAbonnement" Text="Ich besitze bereits ein Zug-Abonnement oder bin bei Lehrbeginn noch nicht 16 Jahre alt." Value="1" Selected="True" />
<asp:ListItem ID="ListItemBestellungHalbtax" Text="Bestellung Halbtax" Value="2" />
</asp:RadioButtonList>
I've created this Radio button list in my webapplication.我在我的 web 应用程序中创建了这个单选按钮列表。 I Need to make a space/tab inside of the Text=" " element.我需要在 Text=" " 元素内创建一个空格/制表符。 How can I do it?我该怎么做? nbsp;
doesn't work and I can't add any tags inside of the text element.不起作用,我无法在文本元素内添加任何标签。
protected void Page_Load(object sender, EventArgs e)
{
if(!Page.IsPostBack)
{
foreach (ListItem item in RadioButtonListGutscheinArt.Items)
{
item.Text = item.Text.Replace(" ", " ");
}
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.