好久没有问问题了,Button事件不触发,小问题,怎么解决??
部分代码:请大家看看问题出在哪?
<%@ Import namespace="System.Web.UI.HtmlControls" %>
<Script language="c#" runat="server">
public void Page_Load(object sender, System.EventArgs e)
{
if(!IsPostBack)
saveBt.Enabled=false;
}
public void sendBt_Click(object sender, System.EventArgs e)
{
landcdhDrop1.SelectedValue="a2";
saveBt.Enabled=true;
}
</Script>
<html>
.....
<asp:Button id="sendBt" runat="server" Text="发 送"></asp:Button>
<asp:Button id="saveBt" runat="server" Width="64px" Text="保存"></asp:Button>
.....
<asp:dropdownlist id="landcdhDrop1" runat="server" size="1">
<asp:ListItem Selected="True" value="a1">a1</asp:ListItem>
<asp:ListItem value="a2">a2</asp:ListItem>
<asp:ListItem value="a3">a3</asp:ListItem>
<asp:ListItem value="a4">a4</asp:ListItem>
</asp:dropdownlist>
...
</html>