1、把DropDownList的AutoPostBack属性设为true
2、你那样是调用不到showControl的,最好把OnSelectedIndexChanged事件写在CS代码中

解决方案 »

  1.   

    <asp:DropDownList id="DDLOrgType" runat="server" Width="100%" CssClass="textStyle" OnSelectedIndexChanged ="ShowControl()"></asp:DropDownList></td>
    ShowControl()不能是js的方法
    你还是再.cs文件里面写吧
    不要忘了设置dropdownlist的AutoPostBack=truehtml才能你那样写
    这是服务器控件,所以不行
      

  2.   

    private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
    {

    }
      

  3.   

    <asp:DropDownList id="DDLOrgType" runat="server" Width="100%" CssClass="textStyle" OnSelectedIndexChanged ="ShowControl"></asp:DropDownList></td><%@page EnableViewState="true"%>
    <asp:DropDownList  AutoPostBack="true"
      

  4.   

    OnSelectedIndexChanged ="ShowControl">notOnSelectedIndexChanged ="ShowControl()">