Help on DropdownList

Joined
Aug 30, 2006
Messages
7
Reaction score
0
I have a problem with my dropdownlist...The selectedvalue doesn't change...

In my page_load, i have already written the code that will populate the dropdownlist inside the 'if not ispostback then' blocks....

and i have set the autopost property of my dropdownlist to true...


And still, teh selectedvalue is always = 1...why is that?


Anybody please help me....
 
Joined
Aug 30, 2006
Messages
7
Reaction score
0
This is my exact code...............



Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here


If Not IsPostBack Then
PopulateDropdownlist()
End If

Dim strFormat As String

If DropDownList1.SelectedValue = "1" Then
strFormat = "mp3"
ElseIf DropDownList1.SelectedValue = "2" Then
strFormat = "wma"
ElseIf DropDownList1.SelectedValue = "3" Then
strFormat = "aac"
End If

End Sub
 

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

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top