Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If (Not IsPostBack) Then
Dim con As OdbcConnection = New OdbcConnection(ConnStr)
Dim cmd As OdbcCommand = New OdbcCommand("SELECT * FROM TABELLA", con)
con.Open()
myDatagrid.DataSource = cmd.ExecuteReader(CommandBehavior.CloseConnection Or _
CommandBehavior.SingleResult)
myDatagrid.DataBind()
End If
End Sub
</script>
<html>
<body>
<asp:DataGrid ID="myDatagrid" HorizontalAlign="Center"
CellPadding="3" Runat="server" />
</body>
</html>