Click here to Skip to main content
15,885,099 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi ,

I am trying to implement OnSelectedIndexChanged event of a dropdown list but I am not able to see the dropdown events in the property window so I added that event in the source as OnSelectedIndexChanged="ddlAdSearch_SelectedIndexChanged" and added corresponding code in the code behind as below.

Code behind:

Private Sub ddlAdSearch_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlAdSearch.SelectedIndexChanged

------
----------
End Sub


But while I am running the application I an getting compile time error like below

BC30456: 'ddlAdSearch_SelectedIndexChanged' is not a member of 'ASP.Menu_aspx'.

Anyone have any idea why I am not able to see the events of that dropdown in the property window and the reason behind this compile time error.

Thanks
Posted

1 solution

I added Protected instead of Private in the code behind and then its worked fine.


Protected Sub ddlAdSearch_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlAdSearch.SelectedIndexChanged

Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900