Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 426
  • Last Modified:

stub not being called by the control

I have a dropdownlist and I created a javascript function to do an eo web essentials callback on the panel it is in
function changeList() {
 eo_Callback("<%=cbpprocess.ClientID %>");
 }

Open in new window

The code for the button is
<asp:DropDownList ID="ddlUnfilteredList" runat="server" Width="508px" 
Height="22px" onselect="changeList();">

Open in new window

I load the Dropdownlistbox on page load and it fills
I double click the dropdownlist in design mode to make the stub in vb.net
I add code to the stub
 
Protected Sub ddlUnfilteredList_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ddlUnfilteredList.SelectedIndexChanged
 Call fillMembers()
 End Sub

Open in new window

When I run the code and select the dropdownlist it does not go to the stub? does anybody know why?

Any help would be greatly appreciated!!!!
R3nder
0
r3nder
Asked:
r3nder
1 Solution
 
käµfm³d 👽Commented:
I believe you are working with client-side scripting when you use onselect. Have you tried it like this:

<asp:DropDownList ID="ddlUnfilteredList" runat="server" Width="508px" 
Height="22px" OnSelectedIndexChanged="ddlUnfilteredList_SelectedIndexChanged">

Open in new window

0
 
CodeCruiserCommented:
Try changing

<asp:DropDownList ID="ddlUnfilteredList" runat="server" Width="508px"
Height="22px" onselect="changeList();">

to

<asp:DropDownList ID="ddlUnfilteredList" runat="server" Width="508px"
Height="22px" onselect="changeList(); return true;">

If it still does not work, try adding AutoPostBack = "true"
0
 
r3nderAuthor Commented:
Autopostback="true" worked
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now