Web Form Controls Database Access

B

Bill

Greetings,

I'm wondering if someone can give me a clear and concise
example of how to bind my controls on a web form to a
datasource.

The simple binding option in the databindings doesn't
seem to work. I'm getting an error that specifies that
my datasource object hasn't been declared.

** This is what I'm doing currently. **

Private Sub Page_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
Dim dscompliancec1 As dscomplianceC

SqlDataAdapter1.Fill(DscomplianceC1, "t_loan_doc")
If Not (Me.IsPostBack) Then
Me.DataBind()
End If
End Sub


Private Sub ShowCompliance(ByVal USALoanNum As
Integer)


End Sub


Private Sub btnSave_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
btnSave.Click

SqlDataAdapter1.Update(dscompliancec1.t_loan_doc)
'DscomplianceC1.t_loan_doc.BeginLoadData()
'DscomplianceC1.AcceptChanges()

Dim Comp As New dscomplianceC

Me.txtBLName.Text = ""
Me.txtBFName.Text = ""

Any assistance would be greatly appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top