Click here to Skip to main content
15,919,341 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have 4 textboxes. On which I want to show values which are readonly. After a button click event I have to show the updated values again.There's some other things to do. need to retrieve data from the database and show it to specific textboxes. Can anyone give me a solution?
Posted
Updated 21-Oct-10 0:26am
v2

Its very simple Sazib.
Just set the ReadOnly proeprty of textbox to True.
Or otherwise set Enabled property to False.
But setting enable false makes appearance of textbox dull.
So better to use ReadOnly property.
 
Share this answer
 
Comments
sazib 21-Oct-10 6:11am    
Thanks for your answer. There's some other things to do. need to retrieve data from the database and show it to specific textboxes
Its very simple.
Make the "ReadOnly" property of Textbox control to True.
For viewing the data atfer a button click

First Cleare all textboxes.
Next write the select query and call it on appropriate textboxes
ok
 
Share this answer
 
Hi,

Right click on Button control,then you will get property window.
There you will find the ReadOnly Property.
Then make it as "False".
Thats it.
 
Share this answer
 
There are plenty of examples in net for this.., what you tried???,
 
Share this answer
 
Its simple.
Textbox control have property called "ReadOnly".
Set that ReadOnly property as "False" by default.
Thats it.
Above modifications will solve your problem.
 
Share this answer
 
Comments
@nuraGGupta@ 21-Oct-10 8:04am    
I provided one vote.......how could setting the readonly property as "False" would solve the problem?

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