سؤال

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!

هل كانت مفيدة؟

المحلول

I fix the problem with this code in Page_load:

GridView.Attributes.Add("onkeydown", "if(event.keyCode==13)return false;");

Thanks!

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top