null reference exception from FindByValue

P

Plateriot

I have 3 Tabs (TabContainer - AJAX)

I've successfully ben able to retain the tab that the user selects so that
the same tab is selected on different pages...

now...

What I really need to be able to do is keep the 'Item' that a user selects
which is in the 2nd tab. - in this case, that Item is a Clinic.

This is what is in my Load Event
.....
'keep whatever tab the user has selected
Tabs.ActiveTabIndex = Session("ssTab")

''IF APPROPRIATE, CONTINUE WITH THE CLINIC THE USER HAS SELECTED


Dim li As ListItem
li =
Me.cmbClinicPCPAtClinic.Items.FindByValue(Session("ssClinic"))

If li IsNot Nothing Then
li.Selected = True

End If

.....
for some reason, either the combo box "cmbClinicPCPAtClinic" is empty at the
moment I try to set the value... OR the Session is null...
which I have proven that it is not by using a Label to test if it actually
has a value.

I cannot set the value of the dropdown box even if I hardcode the value:

li = Me.cmbClinicPCPAtClinic.Items.FindByValue("HON")

Is there something in the TabContainer control that makes a combo box appear
not to be filled during an asynchronous postback?
 
J

Joy

Hi Plateriot,
Before suggesting any solution, i request you to kindly post the entire code
so that i am able to reproduce your problem.

regards,
Joy
 
P

Plateriot

Hi Joy,
Thanks for the offer - the code is very extensive. Can I send you 2 pages
at some location?
 
J

Joy

Hi Plateriot,
You can mail me the code at the following email id:

(e-mail address removed)

regards,
Joy
 

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

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top