右上下文菜单目标

右上下文菜单目标

本文介绍了C#:右上下文菜单目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

这是我的右键上下文菜单单击事件.我想在其中设定一个目标.此上下文菜单仅适用于图像.它在图像上正常工作.在新标签页上有一个选项打开的窗口.我想通过点击事件来完成此选项的工作.

当我单击此选项时,单击的图像将在新窗口中打开.当我从aspx页面中的javascript代码执行此操作时,它就完成了.但知道我想从CS页面中的click事件中获取该信息.请帮帮我.

hi guys,

This is my right context menu click event. I want to set a target in it. This context menu only for a image. it works proper on image. that have a option open window at new tab. i want from click event i want to do this option work.

when i click on this option the clicked image open at new window. it is done when i am do it from javascript code in aspx page. but know i want to that from click event in cs page. please help me.

protected void RadContextMenu1_ItemClick(object sender, Telerik.Web.UI.RadMenuEventArgs e)
   {

       if (e.Item.Text == "OpenInNewWindow")
       {

       }

   }



这是我在aspx页面中的javascript代码:



this is my javascript code in aspx page:

function showingSetAsDesktop(sender, args)

            {
                if (args.get_targetElement().id == "qsfexDesktop")

                    args.set_cancel(true);
            }

               function setAsDesktopItemClicked(sender, args)

            {
              var menuItemValue = args.get_item().get_value();

                 alert(args.get_targetElement().id);
                if (menuItemValue == "OpenInNewWindow")
                 {
                window.radopen(args.get_targetElement().src.replace("Thumb.gif", ".jpg"));
                 }



请帮助我..



please help me in this..

推荐答案


这篇关于C#:右上下文菜单目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 04:25