Need Help with Drop down list

B

brian

Using VS2005

My dropdownlist is not retaining the user selected text.

I have enableviewstate = true. Am binding a dataset to the dropdownlist. Once an item is selected and user clicks submit, the selected item changes back to the first item in the list.

It's not a post back issue as i have steped thru the logic and pageload logic that does the binding is not executing. In fact, in debug mode, the selecteditem.text is the value of the first item on the list before the page load logic.

Here is page load logic - binding takes place in A100_Startup, but when I stop the code at the point of "If Page.If Page.IsPostBack Then the dropdownlist has already lost the user selected text and equals the first item in the list.

If Page.IsPostBack Then
' MsgBox("postback true")
Else
' MsgBox("postback false")
Call A100_Startup()
Application("mPeriod") = Left(Date.Now.Month.ToString, 2).ToString.PadLeft(2, "0") & Right(Date.Now.Year.ToString, 2)
'Me.tbPeriod.Text = Application("mperiod")
PanelCBIReport.Visible = False
panelCommentsReport.Visible = False
PanelOBSList.Visible = False
panelCommentsByZone.Visible = False
panelSheetAudits.Visible = False
panelObserverReport.Visible = False
End If


--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-
 

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,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top