使用ajax时如何在cs中调用js函数?
想在后台想在绑定gridview后再调用一个js方法要如何做?那个gridview是放在updateplan中的,我用
ClientScript.RegisterStartupScript(this.GetType(), "abc", "<script>alert('abc');</script>");没反应
前台:
<asp:UpdatePanel runat="server" ID="updivSearchManager">
<ContentTemplate>
<div style="width:100%; height:307px; overflow:scroll;background-color:White; float:left">
<asp:GridView ID="gvShowFindResult" runat="server" OnRowDataBound="gvShowFindResult_RowDataBound">
</asp:GridView>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="bnGoSearchInDivSearchManager" />
</Triggers>
</asp:UpdatePanel>
后台:
gvShowFindResult.DataBind();
ClientScript.RegisterStartupScript(this.GetType(), "abc", "<script>alert('abc');</script>");