How does the TextBox get populated with the date...?
With this:
If Not Page.IsPostBack Then
Dim conn As New
Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString)
Dim cmd As New Data.SqlClient.SqlCommand
With cmd
.CommandType = Data.CommandType.StoredProcedure
.CommandText = "GetClaim"
cmd.Parameters.AddWithValue("@claim",
Request.QueryString("claim"))
cmd.Parameters.AddWithValue("@pic",
Request.QueryString("pic"))
.Connection = conn
End With
Try
conn.Open()
rd = cmd.ExecuteReader
If rd.HasRows Then
rd.Read()
fill_controls()
End If
Finally
conn.Close()
End Try
End If
and this...
Public Function fill_controls() As Boolean
LAFlbl.Text = rd("Laf").ToString()
Doclbl.Text = rd("DocPmt").ToString
FinalLaftxt.Text = rd("FinalLaf").ToString
PCIndtxt.Text = rd("PCInd").ToString
DteIntxt.Text = rd("DteIn").ToString
Remarkstxt.Text = rd("Remarks").ToString
If rd("BICAdj") Is DBNull.Value Then
Else
BicAdjddl.SelectedValue = rd("BICAdj").ToString
End If
NOTxt.Text = rd("NoBIC").ToString
If rd("IA") Is DBNull.Value Then
Else
DropDownList1.SelectedValue = rd("IA").ToString
End If
If rd("FD") Is DBNull.Value Then
Else
DropDownList2.SelectedValue = rd("FD").ToString
End If
DteToFOtxt.Text = rd("DteToFO").ToString
DteFromtxt.Text = rd("DteBack").ToString
If rd("Results") Is DBNull.Value Then
Else
DropDownList3.SelectedValue = rd("Results").ToString
End If
Amt.Text = rd("Amt").ToString
End Function