【问题标题】:Infragistics WebImageButton does not trigger click event on postback when clickedInfragistics WebImageButton 在单击时不会在回发时触发单击事件
【发布时间】:2014-07-31 20:40:05
【问题描述】:

我正在设计一个包含Infragistics WebImageButton 的页面。 单击该按钮时,我会显示一个确认框。 如果用户点击“确定”,就会发生回发,需要触发我的点击事件,但不会。

这是我所拥有的:

我的webimagebutton

<td><igtxt:webimagebutton id="btnHandle" runat="server" text="Process" usebrowserdefaults="False" cssclass="bodytext">
    <clientsideevents click="confirmProcess"></clientsideevents>
    <RoundedCorners MaxHeight="80" ImageUrl="ig_butXP1wh.gif" MaxWidth="400" HoverImageUrl="ig_butXP2wh.gif"
     RenderingType="FileImages" PressedImageUrl="ig_butXP4wh.gif" DisabledImageUrl="ig_butXP5wh.gif"
     FocusImageUrl="ig_butXP3wh.gif"></RoundedCorners>
    </igtxt:webimagebutton>
</td> 

我的客户端函数:

function confirmBoarding(oButton,oEvent)
{
    var strMessage = "Are you sure you want to proceed?\nIf yes, press OK, otherwise CANCEL";
    if(!confirm(strMessage))
    {
        oEvent.cancel = true;
        return false;}
    }                    
    return;
}

我在代码隐藏中的点击事件:

private void btnHandle_Click(object sender, Infragistics.WebUI.WebDataInput.ButtonEventArgs e)
{
   String here = "I'm here";//never gets hit
}

我的代码隐藏方法永远不会被命中。

我做错了什么? 谢谢

【问题讨论】:

  • 事件处理程序连接在哪里?我在标记中看不到它,您是在代码后面的某个地方这样做吗?如果没有,也许你只需要连接事件处理程序。
  • 这正是我所需要的。已经找到问题了,谢谢解答!!!
  • 我现在添加了这个作为答案。

标签: c# javascript infragistics confirmation


【解决方案1】:

确保您已连接该活动。从提供的标记和 C# 代码来看,没有证据表明该事件已连接。

【讨论】:

    猜你喜欢
    • 2020-02-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-18
    • 2018-09-13
    • 1970-01-01
    • 2019-09-25
    相关资源
    最近更新 更多