[Mono-list] Bug?

Gaurav Vaish gvaish@iitk.ac.in
Sun, 27 Jan 2002 09:13:48 +0530

This is a multi-part message in MIME format.

Content-Type: text/plain;
Content-Transfer-Encoding: 7bit

    While playing with ..Web.UI.WebControls.TextBox, I found that whenever I set
the TextMode (type parameter) to "Password", the contents / value of the control
disappears. The documentation reads:

    "The persistence of the Text property can be done either as an attribute or
as the inner contents of the tag, regardless of the TextMode setting."

    which means that I can set Text (value) in whatever way I like, and it
should work. I tried both the ways, but none of them working for "password"
mode. Is this a bug or am I missing some document?

(PS: Test code attached)

Gaurav Vaish

Content-Type: application/octet-stream;
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;

<%@ Page Language=3D"C#" %>

<script language=3D"C#" runat=3D"server">
void SubmitBtn_Click(Object Sender, EventArgs e)
	Label1.Text =3D "TextBox1.Text =3D " + TextBox1.Text;
	Label2.Text =3D "TextBox2.Text =3D " + TextBox2.Text;
	(C) Master Gaurav, 2002

<h3>Testing TextBox Parameters and Behaviour</h3>

<form runat=3D"server">

<asp:TextBox id=3D"TextBox1" TextMode=3D"Password" Columns=3D"25" =
MaxLength=3D"30" runat=3D"server">
Let me check
<asp:TextBox id=3D"TextBox2" TextMode=3D"Password" Text=3D"Type some =
text here" Columns=3D"25" MaxLength=3D"30" runat=3D"server"/><br>

<asp:Button OnClick=3D"SubmitBtn_Click" Text=3D"Copy Text to Label" =


<asp:Label id=3D"Label1" Text=3D"Label1" runat=3D"server"/><br>
<asp:Label id=3D"Label2" Text=3D"Label2" runat=3D"server"/>