Interview Question in Visual Studio 2005


 

Interview Question :: How can i bind data from database to webcontrols (like textboxes) of Visual Studio 2005 web Application (VB)

I know in Visual Studio.NET 2002/2003 you can bind data to webcontrols by filling the dataadapter and using the dataset's datarow to fetch data from the database.

.NET example.

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Not IsPostBack Then
SqlDataAdapter1.Fill(Flashds, "Vid1")
Flashddl.DataSource = FlashDS
Flashddl.DataMember = "Vid1"
Flashddl.DataTextField = "VideoName"
Flashddl.DataValueField = "Increment"
Flashddl.DataBind()
End If

SqlDataAdapter1.Fill(FlashDS, "Vid1")
If Not FlashDS.Tables(0).Rows.Count = 0 Then
drflash = FlashDS.Vid1(0)

FlashVideo1.VideoURL = drflash("VideoTest")
'Incrementlbl.Text = drflash("Increment")
End If
End Sub

How can i replicate such in VS 2005(VB)?
by ksk