Avatar of Moti Mashiah
Moti Mashiah
Flag for Canada asked on

ASP.NET

HI guys,
I have asp.net application and have button which is implemented on the server side.

<asp:TextBox ID="txtObject" onfocus="this.select();" runat="server" AutoPostBack="True" CssClass="form-control"></asp:TextBox>

Open in new window


I would like to fire this textbox just when user click ENTER key = 13, for now I used the method onchange "txtObject_TextChanged" as it is the only option i have in asp.net.

The issue I have is if I change anything in the textbox it postback and I would like to postback just when I press enter in the textbox.

I also tried to setup the  AutoPostBack to false and It didn't worked for me as if you set it to false the enter key will not work as well.

please any suggestions.

Thank you.
ASP.NET.NET Programming

Avatar of undefined
Last Comment
Moti Mashiah

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Ryan Chong

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Ryan Chong

any further clarification is needed here?
Moti Mashiah

ASKER
thanks, its solve my issue.
Your help has saved me hundreds of hours of internet surfing.
fblack61