Here is my onSelectedIndexChange event in my code behind. I have verified that the postback is taking place. The textboxes are getting updated, but the view on the page is not refreshing. (the textboxes on the page stay the same) until I update something
else on the page. There has to be a good reason why this is happening.
Protected Sub VendorUniqueID_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles VendorUniqueID.SelectedIndexChanged
Me.Dirty.Checked = True
Dim SqlString As String = "SELECT * FROM dbs.vendors WHERE vendor_id = ?"
Using conn As New OdbcConnection(strConnString1)
Using cmd As New OdbcCommand(SqlString, conn)
cmd.Parameters.AddWithValue("vendor_id", Me.VendorUniqueID.SelectedValue)
conn.Open()
Using reader As OdbcDataReader = cmd.ExecuteReader()
While reader.Read()
VendorName.Text = Trim(reader("firstname")) & " " & Trim(reader("lastname"))
VendorNumber.Text = reader("vendor_id")
VendorNumber1.Text = reader("vendor_id")
VendorAdd1.Text = reader("street_1")
VendorAdd2.Text = reader("street_2")
VendorCity.Text = reader("City")
VendorState.Text = reader("State")
VendorZip.Text = reader("Zip")
'Me.Page.refr()
End While
End Using
conn.close()
End Using
End Using
End Sub
Member
236 Points
551 Posts
Re: Playing with update Panels.
May 03, 2010 12:30 PM|mhinkle2|LINK
Here is my onSelectedIndexChange event in my code behind. I have verified that the postback is taking place. The textboxes are getting updated, but the view on the page is not refreshing. (the textboxes on the page stay the same) until I update something else on the page. There has to be a good reason why this is happening.
Need Help