我是新來的asp.net,並面臨一些小問題。問題是將Textbox
和label
設置在不同的位置,雖然我使用<br/>
標籤,但表格看起來非常糟糕,我該如何解決流程問題?文本框和標籤位置問題
代碼:
<tr>
<td align="right" style="padding-right: 5px;" class="style6">
<asp:Label ID="lblEmailId" runat="server" Text="EMAIL ID :"></asp:Label>
</td>
<td align="left" style="padding-left: 5px;" class="style6">
<br/><br/><br/>
<asp:TextBox ID="txtEmailId" runat="server" Width="70%" AutoCompleteType="Office"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtEmailId"
ErrorMessage="You can't leave this empty." Style="color: #FF0000;"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="rfvEmailId" runat="server" ControlToValidate="txtEmailId"
ErrorMessage="Not a Valid Email Address" SetFocusOnError="True" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
ValidationGroup="CreateUserWizard1" Style="color: #FF0000;" /> <br />
</td>
</tr>
<tr>
<td colspan="2">
<br />
</td>
</tr>
<tr>
<td align="right" style="padding-right: 5px; " class="style6">
<asp:Label ID="lblPhoneNo" runat="server" Text="PHONE NO. :"></asp:Label>
</td>
<td align="left" style="padding-left: 5px; " class="style6">
<asp:TextBox ID="txtPhoneNo" runat="server" Width="70%" AutoCompleteType="Office"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtPhoneNo"
ErrorMessage="You can't leave this empty." Style="color: #FF0000;"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="rfvPhoneNo" ControlToValidate="txtPhoneNo" ValidationExpression="\d{10}"
ErrorMessage="The number must be 10 numeric digits!" runat="server" Style="color: #FF0000;" />
</td>
</tr>
PLZ任何一個可以幫助我在此流程...,
一個sugesstion首先學習'HTML/Css',內聯css是BAD練習。請參閱http://www.w3schools.com/ – 2013-04-05 07:27:54