设置为模式弹出扩展器的targetcontrolid时,linkbutton onclick事件未执行 [英] linkbutton onclick event is not executing when set as targetcontrolid of modal popup extender

查看:73
本文介绍了设置为模式弹出扩展器的targetcontrolid时,linkbutton onclick事件未执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ajax模态弹出式扩展程序,其目标控件ID设置为链接按钮,当我单击链接按钮时,弹出窗口即将到来,但链接按钮的单击事件未执行......我想两者都发生,该怎么办....plz help

i m using an ajax modal popup extender whose target control id is set to a link button , when i click on link button the popup window is coming ,but the link button click event is not executing ........ i want both to happen, what to do....plz help

推荐答案

我认为您的模态弹出页面调用首先是由于执行控制切换到那个页面和您的按钮单击事件未执行.为此,请在按钮单击事件方法中编写代码,并在此方法中为调用模式弹出页面编写自身代码.如果这对您没有帮助,请在页面加载中编写按钮单击事件方法代码模态弹出的方法.如果您的问题无法解决,请给我发送代码.祝您有美好的一天
i think your modal pop up page call first and due to this execution control switch to that page and your button click event not executed.for this either write a code in button click event method and in this it self code for call modal pop up page.if this is not helpful to you,write button click event method code in page load method of modal pop up.if your prob not solve by this soln send me your code.have a nice day



进行临时链接,并将模型弹出扩展器的TargetControlID设置为该临时链接.确保它对用户不可见.现在使用您的链接按钮.链接按钮现在可以使用.您只需要做的就是使用后面的代码将model-popup设置为对用户可见.喜欢:
Hi,
Take a temp link and set the TargetControlID of the model popup extender as that temp link. make sure that it cannot visible to user. Now use your link button. The linkbutton will work now. Only thing you need to do is set model-popup visible to the user using code behind. Like:
<a href="#" style="display: none; visibility: hidden;" onclick="return false;" id="TempLnk" runat="server">TempLnk</a>

<act:modalpopupextender id="mpeAgentDtls" backgroundcssclass="BackgroundStyle" runat="server" cancelcontrolid="btnCLose" okcontrolid="btnSelect" targetcontrolid="TempLnk" popupcontrolid="pnlSrcRisk" repositionmode="RepositionOnWindowResize" viewstatemode="Enabled" xmlns:act="#unknown">
</act:modalpopupextender>





protected void lnkMyLink_Click(object sender, EventArgs e)
{
    mpeAgentDtls.Show();
}




--Amit




--Amit


这篇关于设置为模式弹出扩展器的targetcontrolid时,linkbutton onclick事件未执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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