ASP.net DropDownList not gathering value

Murray Brown
Murray Brown used Ask the Experts™
on
Hi. When I select an item in my ASP.net DropDownList I don't see the value in the variable P below
Also after the section the DropDownList text is  blank. What might cause this

    Protected Sub DropDownList1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DropDownList1.SelectedIndexChanged


        Dim P As String = Me.DropDownList1.Text

    End Sub
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Chief Technology Ninja
Distinguished Expert 2018
Commented:
Hi Murray,

Please post both aspx and aspx.vb files (I just want to have a look, it could be either postback issue or maybe a disabled ViewState).

Regards,
Chinmay.
Murray BrownASP.net/VSTO Developer

Author

Commented:
Hi. It was a postback issue. I forgot to put If Not is postback on the page load

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial