Results 1 to 12 of 12

Thread: [Resolved] Click event for a drop down box on ASP page won't fire

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612

    [Resolved] Click event for a drop down box on ASP page won't fire

    I have autopostback set to true on my drop down box. I have the following code which loads 3 values in my drop down box.

    VB Code:
    1. Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    2.         cmbPrograms.ClearSelection()
    3.         If Not IsPostBack Then
    4.             If Request.Cookies("Priveledge").Value = "Administrator" Then
    5.                 cmbPrograms.Items.Insert(0, New ListItem("PDI Sales", ""))
    6.                 cmbPrograms.Items.Insert(1, New ListItem("Price Check", ""))
    7.                 cmbPrograms.Items.Insert(2, New ListItem("RMS Compare", ""))
    8.             End If
    9.         End If
    10.     End Sub

    My problem is that I can't seem to get any events to fire when the user selects one of the values in the box. This is the code I'm using.

    VB Code:
    1. Private Sub cmbPrograms_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbPrograms.SelectedIndexChanged
    2.         If cmbPrograms.SelectedItem.Text = "PDI Sales" Then
    3.             Response.Redirect("PDI Sales")
    4.         End If
    5.     End Sub

    I placed a break point in here and this event doesn't even fire when I click in the drop down box.

    Anyone have any ideas?

    Thanks
    Last edited by indydavid32; Nov 20th, 2003 at 11:01 AM.
    David Wilhelm

Posting Permissions

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



Click Here to Expand Forum to Full Width