Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在部分回发中,ScriptManager.RegisterStartupScript在firefox中不工作_C#_Asp.net - Fatal编程技术网

C# 在部分回发中,ScriptManager.RegisterStartupScript在firefox中不工作

C# 在部分回发中,ScriptManager.RegisterStartupScript在firefox中不工作,c#,asp.net,C#,Asp.net,我正在使用radiobuttonlist中的更新面板 在所选索引更改时,我正在渲染图形。第一次它运行良好 但是,当页面部分地处于getpostback状态时,它就不工作了 我正在使用以下代码注册 updatePanel代码: ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), strChartData, false); <asp:UpdatePanel ID="Fusi

我正在使用
radiobuttonlist
中的更新面板

在所选索引更改时,我正在渲染图形。第一次它运行良好

但是,当页面部分地处于get
postback
状态时,它就不工作了

我正在使用以下代码注册

updatePanel代码:

  ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), strChartData, false);
<asp:UpdatePanel ID="FusionChartsUP" runat="server" UpdateMode="Always">
    <ContentTemplate>
        <div class="main_div">
            <div class="sec_div">
                <div style="width: 900px;">
                    <!-- Code for Graph-->
                    <asp:Panel ID="panelGraphContent" runat="server"></asp:Panel>
                    <div id="dvGraph" runat="server"></div>
                </div>
            </div>
        </div>
    </ContentTemplate>
</asp:UpdatePanel>
ScriptManager.RegisterStartupScript(this,this.GetType(),Guid.NewGuid().ToString(),strChartData,false);
在strChartData=“
一些虚拟数据”

这段代码现在在Chrome和IE上运行得很好,但在Firefox中却不行。 任何解决方案都是如此


我总是这样使用RegisterStartupScript:

<ContentTemplate>
<asp:Panel ID="ContentPanel" runat="server">
<!-- YOUR ACTUAL CONTENT-->
</asp:Panel>

</ContentTemplate>
因为它在UpdatePanel中为控件注册脚本

在我的.js文件中:

function myMagicFunction()
{
//content
};

你能不能也添加更新面板代码?和plz显示strChartData@user2247651您的脚本是否在firefox中启动并中断。或者您的脚本甚至没有被激发?您是否尝试过我的解决方案,其中包含额外的面板和RegisterStartupScript中的更改?
function myMagicFunction()
{
//content
};