awadey Posted October 6, 2003 Posted October 6, 2003 I need a textbox to be runat server, so I can manipulate it in code. Only problem is when <enter> is pressed within the textbox it posts back to the server, which is something I don't want it to do. I have tried setting the autopostback property but to no avail. Any ideas? Quote
Moderators Robby Posted October 6, 2003 Moderators Posted October 6, 2003 If you've disabled AutoPostBack, the enter that you hit is probably the button having focus. Quote Visit...Bassic Software
awadey Posted October 6, 2003 Author Posted October 6, 2003 So does ASP.NET automatically give focus to a button after enter is pressed on a textbox? There are several textboxes on the screen (all having the same problem apart from the multiline one which just goes to the next line in the textbox - obviously:-)). If this is the case, is there a way of stopping the focus being given to the button? Cheers for the quick response anyhow! Quote
awadey Posted October 6, 2003 Author Posted October 6, 2003 That is definately the problem. From every one line textbox on the form, pressing enter invokes the click event of the only button on the form - how do I stop that??? AARRRGGGHHH Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.