laptop and a wrench

漏洞

Toolbar::CurrentTool returns an empty string when in callback request/response.

上次发布: August 25, 2014 No Product Found
漏洞 ID 编号 NIM006759
已提交February 12, 2007
上次修改时间June 5, 2024
适用范围No Product Found
找到的版本9.2
编程语言C#
状态Will Not Be Addressed

附加信息

No Public Explanation

解决办法

When click any tool in toolbar, execute a Javascript to send a callback request to the server with the current tool name. And save the string in a session variable. In the future the current tool name could be retrieved from the session variable. Here is the code:Client side Javascript: function currenttool() { toolbar = Toolbars["Toolbar1"]; var f = document.form1; var mod = f.elements[toolbar.currentToolField].value; return mod; } function manuallyCallbackrequest() { var message = currenttool(); var context = null; <%=sCallbackInvotion%> }Server side code:public partial class _Default : System.Web.UI.Page, ICallbackEventHandler{ public string sCallbackInvotion; protected void Page_Load(object sender, EventArgs e) { sCallbackInvotion = Page.ClientScript.GetCallbackEventReference(this, "message", "processCallbackResult", "context", "postBackError", true); } protected void Map1_MapClick(object sender, ESRI.ArcGIS.ADF.Web.UI.WebControls.PointEventArgs args) { if (Session["currentToolName"] != null) { System.Diagnostics.Debug.WriteLine(Session["currentToolName"].ToString()); } } #region ICallbackEventHandler Members public string GetCallbackResult() { return null; } public void RaiseCallbackEvent(string eventArgument) { Session.Add("currentToolName", eventArgument); } #endregion}

重现步骤

漏洞 ID: NIM006759

软件:

  • No Product Found

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项