echo user input

G

Guest

Hi
I am working on a web application, just wonder how could I display (on a web
page) what the user is typing in another textbox field?
By the way, I am using c# if this would make any difference.

TIA

--
 
W

William F. Robertson, Jr.

You can wire to the onkeydown event for the second text box.

When that function/event fires, you can change the label or whatever you are
wanting to do. C# really has nothing to do with it other than:

txtEntry.Attributes["onkeydown"] = "javascript: EchoText( this );";

HTH,

bill
 
G

Guest

Are we doing some kind of client side programming?
Let me try to see if I get this right. "EchoText" is the client side
javascript event that actually put / echo the text onto another textbox?
I guess I can not have a server control when doing this, can I?

TIA

William F. Robertson said:
You can wire to the onkeydown event for the second text box.

When that function/event fires, you can change the label or whatever you are
wanting to do. C# really has nothing to do with it other than:

txtEntry.Attributes["onkeydown"] = "javascript: EchoText( this );";

HTH,

bill
 
W

William F. Robertson, Jr.

Yes you can have a server control do this. But without posting back every
key stroke, you will need do to the bulk of the work client side. It will
not be a happy user experience if they must wait after each keypress for the
page to reload.

Remember that web programming is disconnected. After the page is rendered
and sent to the browser, the only way to have server side functionality is
to have the page post back to get the server involved.

What exactly are you trying to accomplish?

bill


Are we doing some kind of client side programming?
Let me try to see if I get this right. "EchoText" is the client side
javascript event that actually put / echo the text onto another textbox?
I guess I can not have a server control when doing this, can I?

TIA

William F. Robertson said:
You can wire to the onkeydown event for the second text box.

When that function/event fires, you can change the label or whatever you are
wanting to do. C# really has nothing to do with it other than:

txtEntry.Attributes["onkeydown"] = "javascript: EchoText( this );";

HTH,

bill

Hi
I am working on a web application, just wonder how could I display (on
a
web
page) what the user is typing in another textbox field?
By the way, I am using c# if this would make any difference.

TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top