473,378 Members | 1,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

A question about <asp:ListItem>

Hi,

I have a RadioButtonList control in my aspx page which shows two
radiobuttons - "Yes" and "No". Since my page is intended for international
audience, I would like the texts "Yes" and "No" to be read from resource
files. Right now, I'm doing it by the following code
ListItem[] items = new ListItem[]{new
ListItem(resourceManager.GetString("YES"), "Yes"), new
ListItem(resourceManager.GetString("NO"), "No")};
this.radioButtonList.Items.AddRange(items);

But, I would like to do this using the ASP.NET explicit syntax - something
like this

<asp:radiobuttonlist runat="server">
<asp:listitem value="yes" selected="true"><% =
resourceManager.GetString("YES") %></asp:listitem>
<asp:listitem value="no"><% = resourceManager.GetString("NO")
%></asp:listitem>
</asp:radiobuttonlist>

How do I accomplish this?

CGuy
Nov 17 '05 #1
0 1388

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: CGuy | last post by:
Hi, I have a RadioButtonList control in my aspx page which shows two radiobuttons - "Yes" and "No". Since my page is intended for international audience, I would like the texts "Yes" and "No" to...
4
by: Sally | last post by:
Any ideas on how you handle this in the control? I am using C# if that matters. Want to pass an array or even do id.AnArray=myarry; -Sal
4
by: George | last post by:
I'm using .NET framework 1.1 and VS.NET 2003 for a aspx web form. There is a DropDwonList on the page and its SelectedIndexChanged event is fired to the server normally, until when I add another...
0
by: Adam | last post by:
Hi I split aspx for 1. aspx - www 2. vb But i have problem because Statement is not valid in a namespace. I don't know while this don't power becouse befor split wab all OK Please Help Me...
2
by: Simon Cheng | last post by:
Hi, For the following form: <form runat="server"> <asp:checkboxlist id="list" runat="server"> <asp:listitem runat="server" value="Cash" /> <asp:listitem runat="server" value="Check" />...
5
by: Mark Rae | last post by:
Hi, Has the <asp:DropDownList> - <asp:ListItem> functionality changed in v2? In v1.1, the following works as expected: <asp:DropDownList ID="cmbStatus" Runat=server EnableViewState=False>...
4
by: Kevin Blount | last post by:
As mentioned before, I'm creating a multi-lingual page where the text of the page comes from a database. This page includes a registration form which asks for address information, including the...
7
by: Jim in Arizona | last post by:
Using this: <asp:ListItem Value="0"</asp:ListItem> as long as I have a value listed and leave the area between the tags blank, when viewed the DropDownList will show a 0 as a choice. I want it...
2
by: Dan | last post by:
Hi, i want to use character '<' and '>' (without quotes) as text in the listitem of a dropdownlist in the aspx file. <asp:ListItem Text="< or =" Value="2"></asp:ListItem> there is no error,...
4
by: justice750 | last post by:
Hi All, I am using a FormView control. The allows me to update records in the database. However, when a database field is null I can not update the field on the form. It works fine when the field...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.