Dropdownlist problem simplified

Results 1 to 2 of 2

Thread: Dropdownlist problem simplified

  1. #1
    Join Date
    Dec 1969

    Default Dropdownlist problem simplified

    I add a dropdownlist to my webform. I double click it from the design view. It creates a selectedindexchanged sub for me. Initially it doesn&#039;t seem to get called so I add the function call in my dropdownlist:<BR><BR>&#060;asp:DropDownList id="Henry" runat="server" OnSelectedIndexChanged="Henry_SelectedIndexChanged " Width="147px"&#062;<BR><BR>The function in the code behind page looks like this:<BR>Public Sub Henry_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Henry.SelectedIndexChanged<BR> Label1.Text = "SUCCESS!!"<BR>End Sub<BR><BR>No error is generated, it just doesn&#039;t seem to get called. All the examples I find on this functionality have the function in the same page as the html. Is that a requirement? Anyone?

  2. #2
    Join Date
    Dec 1969

    Default RE: Dropdownlist problem simplified

    By default the dropdownlist does not do a postback. Set autopostback to true and everything will work.<BR><BR>James

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts