在asp.net中设置页面的默认按钮 [英] setting default button for page in asp.net

查看:85
本文介绍了在asp.net中设置页面的默认按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,
我在重新设置页面的默认按钮时遇到问题,我尚未在整个站点中设置任何默认按钮,但我的注销按钮仍在所有页面上都用作默认按钮,因此无论何时我在任何页面上按Enter都将其注销,
我通过采用面板控件并将适当的按钮设置为页面中的默认按钮来解决了此问题.
但是问题是当页面上没有按钮时我该怎么做.有人可以告诉我为什么未设置注销按钮时将其作为默认按钮吗?
在此先感谢朋友

hello friends,
i have a problem reegarding default button of a page, i have not set any default button in my whole site, still my logout button is working as default button on all pages , so whenever on any page i press enter it logs out ,
i solved this problem by taking a panel control and setting suitable button as default button in page.
but problem is how can i do this when there is no button on a page . and can anybody please tell me why logout button is working as default button when i did not set it .
thanks in advance friends

推荐答案

给出 ^ ].希望对您有所帮助.
Simple JavaScript workaround given here[^]. Hope it helps.


第一部分已经回答,让我回答问题的另一部分-
有人可以告诉我为什么未设置注销按钮时将其用作默认按钮
检查表单标签.您确定没有分配默认按钮吗?
另一个原因可能是该按钮设置了第一个标签索引.将其标签索引设置为较大的值.
The first part is already answered, let me answer the other part of the question -
can anybody please tell me why logout button is working as default button when i did not set it
Check the form tag. Are you sure there is no Default button assigned?
The other reason can be that the button has the first tab index set. Set it''s tab index to a big value.


这篇关于在asp.net中设置页面的默认按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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