如何在父面板的内部面板中设置默认的buttion ASP.NET图像按钮 [英] How to set default buttion ASP.NET imagebutton in the inner panel of parent panel

查看:81
本文介绍了如何在父面板的内部面板中设置默认的buttion ASP.NET图像按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<asp:Panel ID="pnl_BeneficaryDetails" runat="server">
 <asp:Panel ID="pnl_BeneGrid" runat="server">
    <asp:ImageButton runat="server" ID="btn_Process" OnClick="btn_Process_Click" Visible="false" ImageUrl="~/image/process.png" ToolTip="Process Payment" />





我尝试过:



使用上面我想要的,当我点击进入图像按钮shuld解雇,但它不工作,当我在单面板中使用相同的工作..



What I have tried:

by using the above i want, when am click enter imagebutton shuld fired, but its not working, and when i am using the same in single panel then its working..

推荐答案

对于Panel的DefaultButton工作你需要让Panel成为焦点......在你的代码中,Panel是第一个(首先是它......)并且它没有任何DefaultButton ......

如果你想要该按钮是全局默认值,使用表单的DefaultButton属性...
For DefaultButton of Panel to work you have to have the Panel in focus... In your code the Panel in focus is the first (as it comes first...) and it has no DefaultButton whatsoever...
If you want the button be a global default, use DefaultButton property of the form...


向父面板添加默认按钮。





Add a default button to the parent panel.


<asp:Panel ID="someOuterPanel" runat="server" DefaultButton="btn_Process">
   <asp:TextBox id="someTextBoxOutsideInnerButtonPanel" runat="server" />
      ... other buttons and stuff...
   <asp:Panel ID="pnl_BeneficaryDetails" runat="server" DefaultButton="btn_Process" > 
         <asp:ImageButton runat="server" ID="btn_Process" OnClick="btn_Process_Click" Visible="false" ImageUrl="~/image/process.png" ToolTip="Process Payment" />


这篇关于如何在父面板的内部面板中设置默认的buttion ASP.NET图像按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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