Question regarding asp.net web forms
-
i want to know how to move a next textbox when user click on enter key.
-
i want to know how to move a next textbox when user click on enter key.
Move how? You can change the layout properties, such as the Left Right and other settings, add paddings, change the margins as needed. Also, apart from the Web Forms code, you can do that in JavaScript code as well, handling the events of key, and then changing the CSS properties of the elements. Something like this,
$("txtBx").keyup(function (event) {
if(event.which == 13) {
// Enter key
var otherTxtBx = $("otherTxtBx");
otherTxtBx.css("margin", "25px"); // You can surely change other values.
}
});This was obviously a thousand-feet overview, but since you have not shown any attempt, I believe this will help you out. [.keyup() | jQuery API Documentation](https://api.jquery.com/keyup/) Did you mean to focus on another text box? If that is the case, then you can change the code in the condition, to the following one,
otherTxtBx.focus(); // Change the focus to a different element
That would do the trick, also if the requirement is something else (other than these two) you can implement that in the condition block, so that it gets executed when user presses enter key.
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
-
Move how? You can change the layout properties, such as the Left Right and other settings, add paddings, change the margins as needed. Also, apart from the Web Forms code, you can do that in JavaScript code as well, handling the events of key, and then changing the CSS properties of the elements. Something like this,
$("txtBx").keyup(function (event) {
if(event.which == 13) {
// Enter key
var otherTxtBx = $("otherTxtBx");
otherTxtBx.css("margin", "25px"); // You can surely change other values.
}
});This was obviously a thousand-feet overview, but since you have not shown any attempt, I believe this will help you out. [.keyup() | jQuery API Documentation](https://api.jquery.com/keyup/) Did you mean to focus on another text box? If that is the case, then you can change the code in the condition, to the following one,
otherTxtBx.focus(); // Change the focus to a different element
That would do the trick, also if the requirement is something else (other than these two) you can implement that in the condition block, so that it gets executed when user presses enter key.
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
I think user actually means to move the cursor to a text box. Not actually move the text box, although it does sound that way.
There are two kinds of people in the world: those who can extrapolate from incomplete data. There are only 10 types of people in the world, those who understand binary and those who don't.
-
I think user actually means to move the cursor to a text box. Not actually move the text box, although it does sound that way.
There are two kinds of people in the world: those who can extrapolate from incomplete data. There are only 10 types of people in the world, those who understand binary and those who don't.
Right, might have been. I updated my answer nonetheless. :-) Thank you for reminder.
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
-
Right, might have been. I updated my answer nonetheless. :-) Thank you for reminder.
The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~
-
I think user actually means to move the cursor to a text box. Not actually move the text box, although it does sound that way.
There are two kinds of people in the world: those who can extrapolate from incomplete data. There are only 10 types of people in the world, those who understand binary and those who don't.
yes move cursor on click to next texbox