L
Logger
I have two datasets wher I populate a dropdown list on startup, depending on
radio button setting. If rbA then use ds_A, if rbB use ds_B. What is the
best way to store the datasets so I can populate the dropdown list without
having to connect to the db and repopulate the datasets every time? Below is
an example of one of my radio buton _checkedChanged event.
If rb_A.Checked Then
rb_B.Checked = False
ddlhs.Items.Clear()
ddlhs.DataSource = ds_A.Tables(0).DefaultView
ddlhs.DataTextField = "Name"
ddlhs.DataValueField = "Schoolid"
ddlhs.DataBind()
ddlhs.Items.Insert(0, New ListItem)
End If
I’m thinking that I have to use ICollection List and ILIST but I’m not sure
how that would work. With autopostback I keep re-initializing my objects.
Help!!
radio button setting. If rbA then use ds_A, if rbB use ds_B. What is the
best way to store the datasets so I can populate the dropdown list without
having to connect to the db and repopulate the datasets every time? Below is
an example of one of my radio buton _checkedChanged event.
If rb_A.Checked Then
rb_B.Checked = False
ddlhs.Items.Clear()
ddlhs.DataSource = ds_A.Tables(0).DefaultView
ddlhs.DataTextField = "Name"
ddlhs.DataValueField = "Schoolid"
ddlhs.DataBind()
ddlhs.Items.Insert(0, New ListItem)
End If
I’m thinking that I have to use ICollection List and ILIST but I’m not sure
how that would work. With autopostback I keep re-initializing my objects.
Help!!