2012-03-19 17 views
0

当我输入任何一个文本框时,我都会出现小圆圈而不是文本。为什么会发生这种情况,我该如何阻止它?文本框中的文本显示为圆而不是常规字符?

代码如下:

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"> 
      &nbsp;&nbsp;&nbsp; 
      Enter User ID: 
     </div> 
     <asp:TextBox id="userIDBox" TextMode="password" runat="server" Height="52px" 
      Width="200px" /> 
    </div> 
    <div class = "passwordTboxDiv"> 
     <div class = "passwordTboxText"> 
      &nbsp;&nbsp;&nbsp; 
      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; 
} 

回答

4

我猜这有什么用它做:

TextMode="password" 

在您的<asp:TextBox>元素。删除TextMode或将其更改为:

TextMode="SingleLine" 

这恰好是默认设置。

+0

OHH!谢谢 :) ... – BigBug 2012-03-19 23:32:36

相关问题