简体   繁体   中英

How to stop “Next” button replacing “Go” button on android 7 soft keyboard while focusing an input of asp website

When I focus on an input of the website on some browsers in Android 7 (Chrome, Firefox...), the "Go" button was replaced by "Next" button. It will be helpful for the form have multiple fields but it's terrible for the asp website, because there is only one form tag in the whole page. It means when I have multiple form in a page, it just moves the focus from this form to another form when I click the "Go/Next" button instead of submitting the form.

Do we have any attribute for the input to ask the OS stop replacing the "Go" button?

Best regards,

Hanh Dang

If you set UseSubmitBehavior="false" the button will be rendered as a <button> <input type='button'> element with JavaScript that causes the postback (instead of a <input type='submit'> element) and this may be enough to trick the Android browser (btw which browser are you using?) into thinking there is no way to submit the form and it not display the Go button for the last form entry box.

Edit

I see your comment that this did not work. Depending on the type of JavaScript framework you are using you may be able to code a traditional <button> (or anything else like <a class='btn'> ) and use GetPostBackEventReference to generate the code to manually initiate a postback (or just call __doPostBack - not recommended but hey, this is old asp.net, right!?).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM