return input" where pressing the enter key would postback my asp textboxes
prematurely - I want the user to click on a button after filling in the
text boxes and pressing enter messes up my plans. Using Giscard's advice
(onkeydown="return event.keyCode!=13")with HTML Input text boxes solved the
postback problem. But now I'm stuck trying to get the text from the HTML
text boxes back into my asp C# code.
Thanks,
NormRequest["myhtmlcontrolname"].ToString()
--
2004 and 2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.masterado.net
"Norm via DotNetMonster.com" <forum@.nospam.DotNetMonster.com> wrote in
message news:43e5b867799d4646b11eccdeebb9edb9@.DotNetMonste r.com...
>I had a similar problem as Ferdi - 19 Aug 2003 - "Postback after carriage
> return input" where pressing the enter key would postback my asp textboxes
> prematurely - I want the user to click on a button after filling in the
> text boxes and pressing enter messes up my plans. Using Giscard's advice
> (onkeydown="return event.keyCode!=13")with HTML Input text boxes solved
> the
> postback problem. But now I'm stuck trying to get the text from the HTML
> text boxes back into my asp C# code.
> Thanks,
> Norm
Hi Norm,
If you assign HTML text control's properties runat=server
and id, e.g. htmlTxtInput, then you can deal with the
control pretty similar to server text control:
string inputValue = this.HtmlTxtInput.Value; // server
control's value is .Text.
HTH
Elton Wang
elton_wang@.hotmail.com
>--Original Message--
>I had a similar problem as Ferdi - 19 Aug 2003 -
"Postback after carriage
>return input" where pressing the enter key would postback
my asp textboxes
>prematurely - I want the user to click on a button after
filling in the
>text boxes and pressing enter messes up my plans. Using
Giscard's advice
>(onkeydown="return event.keyCode!=13")with HTML Input
text boxes solved the
>postback problem. But now I'm stuck trying to get the
text from the HTML
>text boxes back into my asp C# code.
>Thanks,
>Norm
>.
Robbe,
This is exactly what I needed! Thanks!
Norm
--
Message posted via http://www.dotnetmonster.com
0 comments:
Post a Comment