客户端js服务端互相调用
<head runat="server">
<title>无标题页</title>
<script type="text/javascript">
//要写在head内
function ConfirmAddEquipment()
{
if(confirm('调用吗?'))
__doPostBack('CreateDir', '');
}
</script>
</head>
<asp:LinkButton ID="CreateDir" runat="server" OnClick="CreateDir_Click" />
string s = "<script language=javascript>ConfirmAddEquipment();</script>";
ClientScriptManager cs = Page.ClientScript;
Type cstype = this.GetType();
cs.RegisterStartupScript(cstype, "ConfirmAddEquipment", s);//在</from>前执行