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.EventArg s) _
Handles Button1.Click
Dim earg As New EventArgs
Call DropDownList1_S electedIndexCha nged _
(DropDownList1, earg.Empty)
End Sub
Private Sub DropDownList1_S electedIndexCha nged _
(ByVal sender As Object, _
ByVal e As System.EventArg s) _
Handles DropDownList1.S electedIndexCha nged
Button1.Text = _
DropDownList1.S electedValue.To String
End Sub
<P>
<asp:DropDownLi st id="DropDownLis t1" runat="server">
<asp:ListItem Value="Red">Red </asp:ListItem>
<asp:ListItem Value="Green">G reen</asp:ListItem>
<asp:ListItem Value="Blue">Bl ue</asp:ListItem>
</asp:DropDownLis t></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****@discuss ions.microsoft. com> wrote in message
news:BD******** *************** ***********@mic rosoft.com...
Does somebody knows, if there's a way to call the OnSelectedIndex Changed
method of the dropdownlist by myself?
Or does somebody knows a way, to raise the SelectedIndexCh anged Event of a
dropdownlist?
tia
Martin