Here's a short example of what I think might help:
Add the following code to an ASPX page, between the <form> tags:
<asp:ListBox id=ListBox1 runat="server" Width="151px" Height="100px" Rows="5"></asp:ListBox>
<asp:Button id=Button1 runat="server" Text="Send"></asp:Button>
<asp:Label id=Label1 runat="server"></asp:Label>
This code sets up a Listbox to hold the various choices, a Button that the user can click to submit their choice to the server, and a Label to display the text of the selected item.
Then, in your Code Behind file, add the following code:
private void Page_Load(object sender, System.EventArgs e)
String arrTest = new String;
arrTest = "Apples";
arrTest = "Oranges";
arrTest = "Pears";
ListBox1.DataSource = arrTest;
private void Button1_Click(object sender, System.EventArgs e)
Label1.Text = ListBox1.SelectedItem.Text;
At run time, when the page is requested for the first time (IsPostBack is not true), an array is declared, 3 items are added and then the array is assigned to the Listbox.
When the user clicks the button, the text of the selected item is displayed on the Label.
Note that this is just a simple example. For more information, I suggest you take a look at the Quick Start examples that come with the .NET Framework SDK.
If you have more questions (or need help with a VB
.NET instead of a C# solution), feel free to post them here.
Everyone is unique, except for me.