2012-03-19 41 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

相關問題