控件的事件触发所有页面控件

时间:2018-11-09 16:04:27

标签: asp.net vb.net

情况如下,我在页面上有几个控件,每个控件在protected方法中都有一个事件。

重点是,当选择一个DropDownList时,在运行其自己的事件之前,该控件会触发该页面上控件的所有事件。

有人有建议吗?

Protected Sub Cod_nivel1_ni1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles cod_nivel1_ni1.PreRender
        Session("cod_nivel1_ni1") = Me.cod_nivel1_ni1.SelectedValue

End Sub

Protected Sub Cod_nivel2_ni2_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles cod_nivel2_ni2.PreRender
    Session("cod_nivel2_ni2") = cod_nivel2_ni2.SelectedValue

End Sub

Protected Sub Cod_nivel3_ni3_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles cod_nivel3_ni3.PreRender
    Session("cod_nivel3_ni3") = cod_nivel3_ni3.SelectedValue

End Sub

Protected Sub Cod_sistema_sis_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cod_sistema_sis.SelectedIndexChanged

    Session("cod_sistema_sis") = cod_sistema_sis.SelectedValue

    AtualizarArquivosDataLogPRS()

End Sub

Protected Sub DdlSiteId_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ddlSiteId.SelectedIndexChanged
    Session("ddlSiteId") = ddlSiteId.SelectedItem.Text

End Sub


Protected Sub DdlDatsArqMed_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlDatsArqMed.SelectedIndexChanged
    Session("DdlDatsArqMed") = DdlDatsArqMed.SelectedValue
    TratamentoDatMed()

End Sub

0 个答案:

没有答案