Re: how to lock a textbox
- From: stcheng@xxxxxxxxxxxxxxxxxxxx (Steven Cheng[MSFT])
- Date: Tue, 04 Sep 2007 14:17:48 GMT
Hi Moondaddy,
Any further question on this? If so, please feel free to post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
be
Thanks for your prompt response Moondaddy,
Yes, I know your concern here. And the "readonly" html attribute or
"ReadOnly" server control property does help make the textbox prevent from
user inputting and display readonly content without gray them. Is there
anything else prevent you from using this option?
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: "moondaddy" <moondaddy@xxxxxxxxxxxxxxxx>
That's a step in the right direction, however, I don't want the user to
able to type in it, otherwise, they will think they are allowed to do so.
Iwith
want it read-only - locked similar to a windows textbox. The problem
setting enabled=false is that the text is not clear and is more difficultto
read.to
Thanks.
"Steven Cheng[MSFT]" <stcheng@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:83Tqk236HHA.4200@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi Moondaddy,
As Mike has suggested, TextBox can be set to readonly mode(in addition
thedisabled) which will remain the eabled look style.
===========
<asp:TextBox ID="MyTextbox1" runat="server" ReadOnly=true></asp:TextBox>
<input type="text" readonly="true" />
===================
Does thie fit your scenario?
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
From: "Mike" <Mike@xxxxxxxxxxxxxxxxxxxx>
you can make it readonly.
textbox.Readonly = true;
that will give it the normal look like you can type in it, rather then
togray look that disabling it does.
"moondaddy" <moondaddy@xxxxxxxxxxxxxxxx> wrote in message
news:e2CAbTz6HHA.1208@xxxxxxxxxxxxxxxxxxxxxxx
I have a textbox on a webform and based on certain conditions I wanted
texboxprevent a user from editing its text. I dont like the look of the
alsoitwhen its disabled and was wondering if there is a different way to lock
with how hiding it and creating a label to look just like it. I was
going to do this server side.
Thanks.
--
moondaddy@xxxxxxxxxxxxxxxx
.
- Prev by Date: Re: Enabling GZip in MS Ajax
- Next by Date: Re: How to Track User Login
- Previous by thread: Re: Number formatting in a datagrid
- Next by thread: Re: how to lock a textbox
- Index(es):
Relevant Pages
|