Question : Dynamically Label Radio Button Lists in ASP.net

I have a survey form.  It's in Altiris, which I believe uses ASP.net, among other things.  Currently, a survey question might read "How was your service with the Tech Support Team?", which is the label for the RadioButton List.    I want to be able to dynamically change this label, based on content from a table.  A dynamic version of the question might say, "How was your service with TEAM 4".  "Team X" being the variable data.

Is this doable and if so, how?  Please give as much detail as possible as I am not very skilled with ASP.net yet.

I need an example of how to connect to the table with the data and also an example of how to dynamically specify the label text for the Radio Button List.

The code snippet shows just an example of one of the many radio button lists (survey questions) on the page.
1:
2:
3:
4:
5:
6:
7:
8:
<aw:RadioButtonList ID="rblTTechnicalExpertise" Label="2    How satisfied are you with the technical expertise of the" RunAt="server" RepeatDirection="Horizontal" Width="225px">
                    <asp:ListItem Value="1" text="" />
                    <asp:ListItem Value="2" text="" />
                    <asp:ListItem Value="3" text="" />
                    <asp:ListItem Value="4" text="" />
                    <asp:ListItem Value="5" text="" />
                    <asp:ListItem value="0" text="" />
                </aw:RadioButtonList>

Answer : Dynamically Label Radio Button Lists in ASP.net

Hi,

Its absolutely possible.

Bind the RadioButtonList with the datatable in code behind. And set the DataTextField and DataValueField property of RadioButtonList.

Ref:
http://bytes.com/topic/c-sharp/answers/250277-radiobuttonlist-databind
http://www.4guysfromrolla.com/webtech/072701-1.shtml

Happy coding...
Aksh
Random Solutions  
 
programming4us programming4us