English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

How could i disabled user to edit data in textbox i use to view data which i call from database?

I want to make the data uneditable by user..

I guess i got to set the properties of the textbox but which is it?

2007-02-22 03:44:02 · 4 answers · asked by MiRuL 1 in Computers & Internet Programming & Design

4 answers

This is how you would declare it in a web page using ASP.NET



Or

If you are creating a Windows Application, insert the text box and then in the code behind, set:
TextBox1.ReadOnly = true;

Good luck!!

2007-02-22 04:42:41 · answer #1 · answered by jskud 5 · 0 0

check if the TEXTBOX object has a LOCKED property. That's how to do it in VB-6. Set the LOCKED property to TRUE, and the TABSTOP property to FALSE (both are opposite of their default values).

2007-02-22 03:52:01 · answer #2 · answered by Richard H 7 · 0 2

TextBox1.ReadOnly = True
TextBox1.BackColor = Color.White


set readonly to true, but that will change the background to gray.. so if you don't like that, you can change back to white.

2007-02-22 03:52:50 · answer #3 · answered by Zlavzilla 3 · 2 1

Enabled = false or ReadOnly = true

2007-02-22 03:50:21 · answer #4 · answered by Rex M 6 · 1 0

fedest.com, questions and answers