I've been trying to solve this problem for about 12 hours now...
I have a panelbar with multiple sections. On Page Load (or when the user switches to a different panel section) I want to populate that section textboxs with the appropriate information from the SQL query in Code Behind (or anywhere else that will work in each section).
For example:
Panel 1 - Login Information
---- Login: asp textbox ID: txtLogin
---- Password: asp textbox ID: txtPassword1
---- Confirm Password: asp textbox ID: txtPassword1
---- "Save Button"
When clicking the save button I want to save the section data back to the database and do a postback to the same section.
In code behind doing a simple query to member data base using Member_ID as filter.
For example: (sudo code)
Session("MemberID") = "760"
Select Member_ID, mem_login, mem_pass from Personal_Info Where Member_ID = Session("MemberID")
The query returns:
mem_login: jadam
mem_pass: xxxxx
Here's the code behind:
    
I've tested the query (used it in other places) and the query returns the proper information I just don't know how to map the panelbar items to the SQL Select results.
I want to have a "Save" button in each panel section since there is a lot of information on each user (over 360 fields) spread out through multiple sections of the PanelBar.
Panel 2 - Home Address
Same setup as login with labels and textboxes of their address information
Panel 3 - Busines Address
etc.
Any suggestions?
Thanks,
Joe
                                I have a panelbar with multiple sections. On Page Load (or when the user switches to a different panel section) I want to populate that section textboxs with the appropriate information from the SQL query in Code Behind (or anywhere else that will work in each section).
For example:
Panel 1 - Login Information
---- Login: asp textbox ID: txtLogin
---- Password: asp textbox ID: txtPassword1
---- Confirm Password: asp textbox ID: txtPassword1
---- "Save Button"
When clicking the save button I want to save the section data back to the database and do a postback to the same section.
In code behind doing a simple query to member data base using Member_ID as filter.
For example: (sudo code)
Session("MemberID") = "760"
Select Member_ID, mem_login, mem_pass from Personal_Info Where Member_ID = Session("MemberID")
The query returns:
mem_login: jadam
mem_pass: xxxxx
Here's the code behind:
| Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load | 
| 'Get User login information from database | 
| Dim ConnectionString As String = ConfigurationManager.ConnectionStrings("AcvpmDataCS").ConnectionString | 
| Dim conn As New SqlConnection(ConnectionString) | 
| Dim cmd As New SqlCommand("Select Member_ID, mem_login, mem_password FROM Personal_Info WHERE Member_ID = @member_id", conn) | 
| Using conn | 
| conn.Open() | 
| cmd.Parameters.AddWithValue("@member_id", Session("MemberID")) | 
| Dim Reader As SqlDataReader = cmd.ExecuteReader | 
| While Reader.Read() | 
| Dim txtLogin As TextBox = CType(RadPanelBar1.FindControl("txtLogin"), TextBox) | 
| txtLogin.Text = Reader("mem_login").ToString | 
| End While | 
| conn.Close() | 
| End Using | 
| End Sub | 
I've tested the query (used it in other places) and the query returns the proper information I just don't know how to map the panelbar items to the SQL Select results.
I want to have a "Save" button in each panel section since there is a lot of information on each user (over 360 fields) spread out through multiple sections of the PanelBar.
Panel 2 - Home Address
Same setup as login with labels and textboxes of their address information
Panel 3 - Busines Address
etc.
Any suggestions?
Thanks,
Joe