当我输入任一文本框时,我会看到小圆圈而不是文字。为什么会发生这种情况?如何阻止它?
代码如下:
HTML:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MainPage.aspx.cs" Inherits="Foods.MainPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link id="Link1" rel="stylesheet" type="text/css" href="Styles/mainStyle.css"/>
</head>
<body>
<form id="form1" runat="server">
<div class = "userIDTboxDiv">
<div class = "userIDTboxText">
Enter User ID:
</div>
<asp:TextBox id="userIDBox" TextMode="password" runat="server" Height="52px"
Width="200px" />
</div>
<div class = "passwordTboxDiv">
<div class = "passwordTboxText">
Enter User Password:
</div>
<asp:TextBox id="TextBox1" TextMode="password" runat="server" Height="52px"
Width="200px" />
</div>
</form>
</body>
CSS:
body
{
text-decoration:none;
background: white;
}
input
{
margin-left: 0px;
margin-top: 7px;
}
.userIDTboxDiv
{
padding-top: 20%;
padding-left: 45%;
width: 15%;
height: 30%;
}
.userIDTboxText
{
padding-left: 17%;
height: auto;
width:203px;
}
.passwordTboxDiv
{
padding-top: 2%;
padding-left: 45%;
width: 15%;
height: 111px;
}
.passwordTboxText
{
padding-left: 10%;
height: auto;
width:203px;
}
答案 0 :(得分:4)
我猜这与它有关:
TextMode="password"
在您的<asp:TextBox>
元素中。删除TextMode
或将其更改为:
TextMode="SingleLine"
恰好是默认值。