C# 如何在asp.net中调用ASPxPopupControl\u WindowCallback中的Javascript函数

C# 如何在asp.net中调用ASPxPopupControl\u WindowCallback中的Javascript函数,c#,javascript,asp.net,C#,Javascript,Asp.net,我有一个ASPxPopupControl,在回调函数中我想调用一个javascript函数 <script type="text/javascript"> function ShowAlert() { alert('Display Message Alert'); } </script> protected void ASPxPopupControl_WindowCallback(object source, DevExpress.W

我有一个ASPxPopupControl,在回调函数中我想调用一个javascript函数

<script type="text/javascript">
    function ShowAlert() {
      alert('Display Message Alert');
    }   
</script>


protected void ASPxPopupControl_WindowCallback(object source, DevExpress.Web.ASPxPopupControl.PopupWindowCallbackArgs e) {

    I want to Call ShowAlert() javascript function from here
}

I tried this code but it only works on button click event

Page.ClientScript.RegisterStartupScript(GetType(), "MyKey",                 "ShowDetailView();", true);

函数ShowAlert(){
警报(“显示消息警报”);
}   
受保护的void ASPxPopupControl\u WindowCallback(对象源,DevExpress.Web.aspxpopopopcontrol.popuppindowcallbackargs e){
我想从这里调用ShowAlert()javascript函数
}
我尝试了这段代码,但它只适用于按钮单击事件
Page.ClientScript.RegisterStartupScript(GetType(),“MyKey”,“ShowDetailView();”,true);

这是一段工作代码,将从codebehind调用javascript函数

<script type="text/javascript">
    function ShowAlert() {
      alert('Display Message Alert');
 }   
</script>
Extra如果您想用javascript打开窗口而不是弹出窗口

ScriptManager.RegisterStartupScript(Page, typeof(Page), "Alert", "window.open('description.aspx','Mywindow','scrollbars=Yes,width=800,menubar=yes, resizable=No');", true);

嗨,CodeBrain,在按钮点击事件下代码工作正常。但是我需要把它放在ASPxPopup_WindowCallback下,代码不会执行。有没有办法解决这个问题?谢谢整个流程是这样的,我有一个ASPxPivotGrid控件,它在单元格单击时执行ASPxPopupControl回调,以获取一些参数值。获取这些值后,我需要调用javascript函数来显示新页面或显示消息。我现在被困在如何从回调调用javascript上。谢谢
ScriptManager.RegisterStartupScript(Page, typeof(Page), "Alert", "window.open('description.aspx','Mywindow','scrollbars=Yes,width=800,menubar=yes, resizable=No');", true);