In ASP.NET Webforms, how do you discover who hit a text key?

In ASP.NET Webforms, how do you discover that someone has pressed the enter key, type?

Please do not respond to Javascript.

I need to handle all this in code using VB.NET.

+5
source share
6 answers

Why do you need to determine which TextBox was clicked? Do you want to see which TextBox is focused so that you can trigger the correct button click event?

If you want to do something like this, one trick I did was to "group" the corresponding form elements in my panel and then set the "DefaultButton" property accordingly.

" ", " ", " " .. / - , .

+2

, javascript - enter, - , . , JS , .

+2

Javascript . .

+1

, script . . (.. Javascript), .

+1

, Request.Form, , , . , ( ). , , - - , .

+1

- ( ) , . , .

, - , ( ...), OnBubbleEvent, , . OnBubbleEvent "", .

+1

All Articles