Hi Martin,
You should be able to call the subroutine on your own as long as you pass
the parameters it expects.
Here's a way to do it on a button click:
Private Sub Button1_Click _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles Button1.Click
Dim earg As New EventArgs
Call DropDownList1_SelectedIndexChanged _
(DropDownList1, earg.Empty)
End Sub
Private Sub DropDownList1_SelectedIndexChanged _
(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles DropDownList1.SelectedIndexChanged
Button1.Text = _
DropDownList1.SelectedValue.ToString
End Sub
<P>
<asp:DropDownList id="DropDownList1" runat="server">
<asp:ListItem Value="Red">Red</asp:ListItem>
<asp:ListItem Value="Green">Green</asp:ListItem>
<asp:ListItem Value="Blue">Blue</asp:ListItem>
</asp:DropDownList></P>
<P>
<asp:Button id="Button1" runat="server" Text="Button"></asp:Button></P>
Is this what you meant?
Ken
Microsoft MVP [ASP.NET]
Toronto
"Martin" <Ma****@discussions.microsoft.com> wrote in message
news:BD**********************************@microsof t.com...
Does somebody knows, if there's a way to call the OnSelectedIndexChanged
method of the dropdownlist by myself?
Or does somebody knows a way, to raise the SelectedIndexChanged Event of a
dropdownlist?
tia
Martin