Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I have a textbox and a button. Every time I enter stuff in my textbox, it should be added in a control below the textbox and override the input.
Now what control should i use, that will accept the input?
Posted
Updated 31-Aug-11 22:44pm
v2
Comments
Abhijit Jana 1-Sep-11 4:45am    
I am not clear with your question ? So you have two textbox and you want to override others value on change of other or what ? Please explain.
Anele Ngqandu 1-Sep-11 4:50am    
Actualy i have 1 textbox and a button, now i need to know what to use to view the stuff from the textbox
Abhijit Jana 1-Sep-11 4:54am    
Why you are not using a label / div control and associate a JavaSscript with the TextBox change to write the text on label or dIv's innerhtml

Hi,

You could use javascript to do so, just add your text to a div should do the trick, or if you prefer using codebehind I'd use a list control and add literals containing the last value of your textbox at runtime.

I hope I understood your question...
 
Share this answer
 
You can add an Attribute of onChange with the TextBox, that will call a JavaScript method.
TextBox1.Attributes.Add("onchange", "JSMethod();");
On that particular method you can override the other control text by getting the value of current textbox.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900