这个标记:
<asp:TextBox ID="txtAddress" CssClass="s175" runat="server" MaxLength="30" placeholder="Street"></asp:TextBox>
呈现为:
<input name="ctl00$LeftColumnContent$txtAddress" type="text" maxlength="30" id="LeftColumnContent_txtAddress" class="s175 text" placeholder="Street">
但是在另一个项目上,这个标记:(完全一样)
<asp:TextBox ID="txtAddress" CssClass="s175" runat="server" MaxLength="30" placeholder="Street"></asp:TextBox>
导致这种情况发生:
<input name="ctl00$ContentPlaceHolder1$txtAddress" type="text" maxlength="30" id="ContentPlaceHolder1_txtAddress" class="s175" placeholder="Street">
为什么“文本”类没有得到应用?这是class="s175"
对class="s175 text"
。