Change Enter for Tab
-
27-04-2021 - |
Question
I need to make the Enter key as Tab, changing the focus of the controls. I tried several methods of javascript and it worked well... but in some ModalPopupExtender when i click in enter, it closes the PopUp, or in other cases that have a gridview with TextBox inside, by clicking enter it also closes a PopUp or generates a postback. Someone have any solutions? Thanks for the help!
Solution
I fix the problem with this code in Page_load:
GridView.Attributes.Add("onkeydown", "if(event.keyCode==13)return false;");
Thanks!
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow