Disabling a text box control so no input is allowed

Ok i have a textbox control that is used for inputing a phone number. If the person does not want to change their existing number i disable the text box control by doing this:


PhoneNumberEF.Enabled = false;

The problem is that this grey's the text box out but you can still place the cursor in it and type. Which may enable the not-so-saavy user to believe he can change the phone number. I want to prevent the user from being able to type in the text box at all. What property do i need to set?
Thanks,
-=angst=-
0
dsk_angst
1/11/2005 5:23:58 PM
asp.net.getting-started 91979 articles. 4 followers. Follow

2 Replies
458 Views

Similar Articles

[PageSpeed] 23

Try the ReadOnly property.

hope this helps,
sivilian
My Weblogs
0
sivilian
1/11/2005 6:00:04 PM
Thank you I will try that. =)
0
dsk_angst
1/11/2005 6:49:09 PM
Reply:

Similar Artilces:

How to get Value of teh Input type text box created using html and writing this html in label control.
Hi,i created a input control like this pdr is datarow strPricing = strPricing & "<Table cellSpacing=""1"" cellPadding=""1"" border=""0""> "For Each pdr In dsPricing.Tables(0).RowsstrPricing = strPricing & "<TR> "strPricing = strPricing & "<TD style=''WIDTH: 130px; FONT-SIZE: 10pt; FONT-FAMILY: Arial''>' & Convert.ToString(pdr.Item('OptionCode')) & '</TD>'strPricing = strPricing & "<TD align=""left"" style=''WIDTH: 110px''><...

I need a control to allow user to write Text and I get the Html of Text
Hi all i need a control to allow user to write Text , but i want the user to write Colored Text and so on . And i want to save the html of the text writen . Thanks all Hi, take a look at the free component, freetextbox. Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Workaround for non working Mark as answer buttons. hi , i downloaded the control you gave me , but it doesn't work good , For example , i want to insert the html tag it does in database , i get the tags , But it isn't inserted in database Please help if u can...

Ritch Text Box control from Free Text Box
I have a client that is complaintaning about how hurd it is to format a html page with that tool it is great for someone like us who knows how to work with HTML and all that.. is it a good program or tool that i can show him so he ca format a page for easily ?? right now is using Word and do a copy paste..but its not showing off the same thing... thanx.I like programming If he is using word you might want to look at this... Peters MHTML Control Cheers, Dave...

preserving the layout of text input via text input control
Ok what I want to do is, when using the text input control all cr, lf, crlf and spaces are preserved when the content is input in a db and that the information/layout is preserved when viewing it in a text input filed or grid control.any ideas   jim When you input text via a multiline textbox and insert it into a database your specified line breaks will be maintained. When retrieving the record, you will need to do a replace on the string in order to interpret these line breaks in your html:myField.Replace("\n", "<br />")Does this answer your q...

how to get the disabled text box value???
Hi I need to get the disabled text box value, when i am trying to access with x=txtName.text ; it's not returning anything when it is disabled. I can not use request["txtName"]; thanks sridhar I don't see any problems to get value from disabled textbox. I created textbox and disabled it both ways (in properties and programmatically), and I can get value without any problems. Looks like you have other problems. hi, the enabled / disabled property does not affect the value! string text=mytextbox.text should work!...

Getting value of a text input box.
Hi, i'm trying to get the value of a text input box in a form.  I think i may be over-complicating the situtation, but this is basically what i'm trying to do:String scriptString += "<script language=JavaScript>\n"; scriptString += "document.write('document.getElementById('hour01').value')";scriptString += "</script>\n"; String TextField = ClientScript.RegisterStartupScript(typeof(Page), "arrayScript2", scriptString); Of course ClientScript.RegisterStartupScript doesn't actually return a value, so i kno...

Disabling text box web control
Hi All, I want to disable a text box web control based on the click event of html server control. Please suggest a way for the same... <input id="chkFlag" type="checkbox" onclick="disableCtrls" name="chkFlag" runat="server" > <asp:textbox id="txtValue" runat="server" name="txtValue" ></asp:textbox> Thanks in advance... Hi, Its just setting the Enabled property of Textbox to false. If the id of your txtbox is myTextBox. Within the event CheckedChanged use the belo...

Fix broken text wrapping and control input text length in TextBox control
Hi! I'm developing a(nother; it's my second!) ASP.NET application that right now is giving me fits. On one of my screens, the user needs to be able to enter large amounts of text into three database fields. The database fields are all char(350). I'm having two problems with this. First of all, I found that when editing an existing record, text in the fields would wrap in a manner similar to this: Wow, what a sorryperformance! The text box is much wider than the text "Wow, what a sorry", so I couldn't figure out why the text was wrapping. I tried setting the Columns property to 90 (which...

get text box value which is in user control ??
 hi all,in my asp.net project i m using user control which have some  text boxes and drop down list now i m using that user control in my aspx pagesnow the problem is how i can get the values of the text boxes and drop down lists which are in user control in my pageshelpregard New In .NET World In your user control, expose the text boxes, drop down lists are public properties. Like public TextBox TextBoxUserName { get( return textBox1); } Then simply access them in the parent control as: myUserControl.TextBoxUserName.Text Or you can use FindControl method: TextBox txtBox =...

Regular Expression to Control Input To Text Box
Dear All,              I am new to all this regular expression I need a small help. I want to disable a certain character to be input into my text box such , > < # etc. So I want to control it via regular expression. How can I do it please ? Thanks.  Get yourself a copy of Expresso (a free download from http://www.ultrapico.com/Expresso.htm) This will allow you you write and test expression before using them in your program. Remember that all client side code such as a regular expression validator are a convenianc...

superreview requested: [Bug 233094] [FIX]input text doesn't appear in text box if text box is in floated cell : [Attachment 140654] This fixes all three testcases and the website
Boris Zbarsky <bzbarsky@mit.edu> has asked David Baron <dbaron@dbaron.org> for superreview: Bug 233094: [FIX]input text doesn't appear in text box if text box is in floated cell http://bugzilla.mozilla.org/show_bug.cgi?id=233094 Attachment 140654: This fixes all three testcases and the website http://bugzilla.mozilla.org/attachment.cgi?id=140654&action=edit ------- Additional Comments from Boris Zbarsky <bzbarsky@mit.edu> David, what do you think? ...

superreview granted: [Bug 233094] [FIX]input text doesn't appear in text box if text box is in floated cell : [Attachment 140654] This fixes all three testcases and the website
David Baron <dbaron@dbaron.org> has granted Boris Zbarsky <bzbarsky@mit.edu>'s request for superreview: Bug 233094: [FIX]input text doesn't appear in text box if text box is in floated cell http://bugzilla.mozilla.org/show_bug.cgi?id=233094 Attachment 140654: This fixes all three testcases and the website http://bugzilla.mozilla.org/attachment.cgi?id=140654&action=edit ------- Additional Comments from David Baron <dbaron@dbaron.org> I'm not crazy about any of the table pseudo frame construction code, and I don't remember my previous objection ...

Getting error while disabling the text boxes on Web Form
Hello Folks...THis is very urgent ...Plz help...Following is a piece of code....to disable all the textBoxes on a WebForm in ASP.Net.(Lang:VB.Net) Private Sub disableAllTextBoxes(ByVal ControlArray) Dim control As Object Dim temptxtbox Dim i As Integer For Each control In ControlArray       If control.GetType.Name = "TextBox" Then          control.GetType.GetTypeArray(control).CopyTo(temptxtbox, 0)          For i = 0 To UBound(temptxtbox)     &n...

Changing the text of an input (text) control
Hi everyone, please answer the following: I have a html input control as follows  <input id="newSearch_keywords" type="text" class="text" value="<%=JobsSearchBusinessObject.CurrentKeywords %>" name="newSearch_keywords""/>    When the page loads I need to look at the text of this input field and remove any * chars that are in the text. Thanks for your help <input id="newSearch_keywords" type="text" class="text" value="<%=JobsSearchBusinessObject.CurrentKeywords.Re...

Web resources about - Disabling a text box control so no input is allowed - asp.net.getting-started

Facebook Apologizes For Disabling Apps, Launches New Feedback Metrics, Granular Enforcement, Disabled ...
Facebook today apologized for suddenly disabling certain apps last month, saying that it “over-weighted certain types of user feedback, causing ...

Horace Cooper on Disabling Cell Phones in Running Cars - YouTube
National Center adjunct fellow Horace Cooper discusses the dangers and detriments of automatically disabling cell phones through ignition-sensitive ...

Disabling perceptions
All band movies are the same but different, especially this one, writes Craig Mathieson.

Heartbleed bug prompts disabling of public federal government sites
All federal departments using software vulnerable to the so-called Heartbleed bug have been ordered to immediately disable public websites.

Heartbleed bug prompts disabling of federal government public websites - CTV News
The federal tax agency says it expects to have its online services running again this weekend after blocking public access on April 9 due to ...

Heartbleed Bug Prompts Disabling Of Federal Government Public Websites
OTTAWA - The federal tax agency says it expects to have its online services running again this weekend after blocking public access on April ...

Yet another Java vulnerability discovered, researchers recommend disabling browser plug-in
Following an attack on a smaller number of corporate Macs that exploited exploited a flaw in the Java browser plug-in, researchers from security ...

Retailers disabling NFC payments in preparation for new wireless payment method
Google Wallet never really gained popularity. It was fun paying for things by tapping your phone to a sensor, but not enough people knew about ...

Everything you wanted to know about disabling apps on your Android
Pre-installed apps can sleep with the fishes if you know where to look to do it

MX Player Updated With Android 5.0 Support, File Viewing Options, Easy Audio Track Disabling, And More ...
MX Player is now ready for Android Lollipop. No, it's not any prettier than it was before. There's no Material Design to drool over, no bright ...

Resources last updated: 12/15/2015 12:50:20 PM