E
EEEdiot
Okay,
I know to add content dynamically to web page file you can have
something like the following and it would add a whole bunch of <option>
items for the <select> list. How do you dynamically add <optgroup> items
and <options> under them?
TIA!
In ASPX file:
<%@ Page Language="VB" inherits="..." Src="... .vb" AutoEventWireup="False"
%>
....
<select style="WIDTH: 155px" id="lst_Currency" runat="server"></select>
....
In VB file:
Imports ...
Public Class ...
Public Sub Page_Load(sender as Object, e as EventArgs) _
Handles MyBase.Load
If Me.IsPostBack = False
lst_Currency.Items.Add(New ListItem("Euros", "0.6075"))
lst_Currency.Items.Add(New ListItem("Japanese Yen",
"79.7894"))
lst_Currency.Items.Add(New ListItem("US Dollars", "0.7344"))
lst_Currency.Items.Add(New ListItem("Lower Slobovian
Dinars", "733.4939"))
End If
End Sub
End Class
I know to add content dynamically to web page file you can have
something like the following and it would add a whole bunch of <option>
items for the <select> list. How do you dynamically add <optgroup> items
and <options> under them?
TIA!
In ASPX file:
<%@ Page Language="VB" inherits="..." Src="... .vb" AutoEventWireup="False"
%>
....
<select style="WIDTH: 155px" id="lst_Currency" runat="server"></select>
....
In VB file:
Imports ...
Public Class ...
Public Sub Page_Load(sender as Object, e as EventArgs) _
Handles MyBase.Load
If Me.IsPostBack = False
lst_Currency.Items.Add(New ListItem("Euros", "0.6075"))
lst_Currency.Items.Add(New ListItem("Japanese Yen",
"79.7894"))
lst_Currency.Items.Add(New ListItem("US Dollars", "0.7344"))
lst_Currency.Items.Add(New ListItem("Lower Slobovian
Dinars", "733.4939"))
End If
End Sub
End Class