图像按钮和asp:button [英] Image Buttons and asp:button

查看:92
本文介绍了图像按钮和asp:button的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我每次按下Enter时都有2个asp:ImageButtons和1个asp:Button我只想执行asp:button功能

Iam having 2 asp:ImageButtons and 1 asp:Button whenever press enter i want to perform asp:button functionality only

推荐答案

可以包括以下内容:

1:将所有控件包装在asp:Panel中,并将DefaultButton属性设置为您希望能够按Enter的按钮的名称.
2:使用 UseSubmitBehavior [
There are a number of things you can do including the following:

1: Wrap all of your controls in an asp:Panel and set the DefaultButton property to the name of the button you want to be able to press enter for.
2: Use the UseSubmitBehavior[^] property of the button.


u的方法称为"'focus()''


使用它,您可以在特定控件上获得Gocus
在窗体加载时尝试编写以下代码



Button1.Focus();
u have method called ''focus()''


using that u can get gocus on particular control

on form load try to write the following code



Button1.Focus();


这篇关于图像按钮和asp:button的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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