T
Tony T
Why is it that, in a UserControl, a Button control fires it's Click routine
fine, without any specail coding, however, a Dropdownlist or RadioButtonList
do not fire their SelectedIndexChanged without some massaging?
I've created a UserControl which contains 2 WebControls.TextBoxes, 1
WebControls.DropdownList, and 2 WebContols.Button and I a cannot seem to get
the SelectedIndexChanged routine, for the DropdownList, to fire.
I've set the AutoPostback to TRUE for the DropdownList.
Rather than posting code and asking for you to correct it, I'm looking for
an explanation as to why it appears there is a difference between the Button
and DropdownList controls. So eventhough the SelectedIndexChanged routine
for a DropdownList control is VERY similar to the Click routine for a Button
control, and they are both WebControls, why does there appear to be a
difference in the way these two controls behave.
I hoping that a good description of why these two controls behave
differently will lend itself to me being able to come up with the correct
code.
"Give a man a bucket of fish and he'll eat for a day. Teach him how to fish
and he'll eat for the rest of his life."
Thank you
Similar routine declarations:
(Button)
Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnCancel.Click
Response.Redirect("default.aspx")
End Sub
(DropdownList)
Private Sub ddl_SelectedIndexChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles ddl.SelectedIndexChanged
End Sub
fine, without any specail coding, however, a Dropdownlist or RadioButtonList
do not fire their SelectedIndexChanged without some massaging?
I've created a UserControl which contains 2 WebControls.TextBoxes, 1
WebControls.DropdownList, and 2 WebContols.Button and I a cannot seem to get
the SelectedIndexChanged routine, for the DropdownList, to fire.
I've set the AutoPostback to TRUE for the DropdownList.
Rather than posting code and asking for you to correct it, I'm looking for
an explanation as to why it appears there is a difference between the Button
and DropdownList controls. So eventhough the SelectedIndexChanged routine
for a DropdownList control is VERY similar to the Click routine for a Button
control, and they are both WebControls, why does there appear to be a
difference in the way these two controls behave.
I hoping that a good description of why these two controls behave
differently will lend itself to me being able to come up with the correct
code.
"Give a man a bucket of fish and he'll eat for a day. Teach him how to fish
and he'll eat for the rest of his life."
Thank you
Similar routine declarations:
(Button)
Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnCancel.Click
Response.Redirect("default.aspx")
End Sub
(DropdownList)
Private Sub ddl_SelectedIndexChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles ddl.SelectedIndexChanged
End Sub