<%@ Import Namespace="System.Data.OleDb" %>
<%@ Import Namespace="System.Data" %>
<HTML>
<script language="VB" runat="server">
Dim MyConnection As OleDbConnection
Public Sub Page_Load(ByVal Sender As System.Object, ByVal E As System.EventArgs) Handles MyBase.Load
MyConnection = New OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0; Data Source=" & Server.MapPath("database/utenti.mdb"))
If Not (IsPostBack) Then
BindRadio()
End If
End Sub
Sub BindRadio()
Dim DS As DataSet
Dim MyCommand As OleDbDataAdapter
MyCommand = New OleDbDataAdapter("select * from utenti", MyConnection)
DS = New DataSet
MyCommand.Fill(DS, "utenti")
Dim Source As DataView = DS.Tables("utenti").DefaultView
rblEmails.DataSource = Source
rblEmails.DataBind()
End Sub
</script>
<body>
<form runat="server" ID="Form1">
<asp:radiobuttonlist id="rblEmails" runat="server"
DataValueField="email" DataTextField="email" />
</form>
</body>
</html>