|
-
July 31st, 2002, 01:17 PM
#1
Press Enter in textbox
Hi all!
Please, help me
I have button 'Save' and TextBox on my WebForm.
When i press 'Enter' in my textbox i need to add a new line, and not press 'Save' button.
What should i do?
Thx in advance!
-
August 4th, 2002, 01:10 AM
#2
I think you can have two alternatives.
1) Change the button Save to LinkButton.
2) Add a piece of client script (javascript) to your TextBox for event onkeypress, check if the key code is 13, i.e. Enter is pressed, you make a call to the PostBack function.
For detail, refer to Page.GetPostBackClientHyperlink().
If it helps you, thanks for rating.
-
August 4th, 2002, 01:14 AM
#3
Ohhhhhhhhhh.. sorry. After I clicked the sumit, I found I misunderstand your question.
If you want a new line by pressing Enter, you should use multi-line TextBox, just change the TextMode property, you will get what you want.
If it helps you, thanks for rating.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|