response.write的替代方法,以便updatepanel工作 [英] alternative of response.write so that updatepanel work

查看:64
本文介绍了response.write的替代方法,以便updatepanel工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在更新面板中有标签.
在该标签中,我有一个饼图,它没有悬停效果.
Response.Write(mychartdata.getImageMap("imgMap3"));会产生悬停效果,但会停止下拉onselected事件.

I have label within the update panel.
In that label, I have a pie chart, which do not have a hover effect.
Response.Write(mychartdata.getImageMap("imgMap3")); does the hovering effect, but it stops dropdown onselected event.

lblReferedByBelow.Text = "<img border='0' usemap='#imgMap3' src='pieChartServer.aspx?Legends=(" + strHeading + ")&Vals=(" + strValues +
                    ")&Expload=(" + strExpload +
                   ")&fontface=" + "verdana" +
                   "&fontsize=" + "8" +
                   "&LS=" + "10" +
                    "&RS=" + "10" +
                    "&TS=" + "10" +
                    "&BS=" + "10" +
                    "&pieRatio=" + "70" +
                   "&bar3dratio=" + "8" +
                   "&EoffSet=" + "35" +
                    "&imgFormat=" + 0 +
                    "&pieDia=" + 200 + "'>";
Response.Write(mychartdata.getImageMap("imgMap3"));

推荐答案

Response.Write在使用UpdatePanels时永远无法正常工作.

要解决此问题,请将所需的结果从Response.Write移到页面上自己的控件中,然后将其放在更新面板中.

然后在后面的代码中,而不是Response.Write,执行获取数据所需的步骤,然后调用UpdatePanel.Update().确保新的更新面板属性"UpdateMode"为"Conditional".
Response.Write never works properly when UpdatePanels are used.

To resolve this, move the result you wish to achieve from the Response.Write into its own control on the page, and place it inside an update panel.

Then in code behind, instead of Response.Write, perform the steps you need to get the data, then call UpdatePanel.Update(). Ensure the new update panel attribute "UpdateMode" is "Conditional".


这篇关于response.write的替代方法,以便updatepanel工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆