ASP.NET 布局问题
<divid="loginhead"><asp:LoginID="Login1"runat="server"><LayoutTemplate><label>UserNam...
<div id="loginhead">
<asp:Login ID="Login1" runat="server">
<LayoutTemplate>
<label>UserName: </label>
<asp:TextBox runat="server" ID="UserName" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" ControlToValidate="UserName"></asp:RequiredFieldValidator>
<label>Password: </label>
<asp:TextBox ID="Password" runat="server"></asp:TextBox><asp:RequiredFieldValidator
ID="RequiredFieldValidator2" runat="server" ErrorMessage="*" ControlToValidate="Password"></asp:RequiredFieldValidator> 
<asp:Button ID="Button1" runat="server" Text="Login" CommandName="Login"/>
<br />
; <asp:CheckBox ID="CheckBox1" runat="server" Text="Remember me next time"/>
&<asp:HyperLink ID="HyperLink1" runat="server" Font-Underline="true" NavigateUrl="~/PasswordRecover.aspx">Forget your password?</asp:HyperLink>
</LayoutTemplate>
</asp:Login>
<asp:Button ID="Button2" runat="server" Text="Button" />
</div>
最下面这个按扭总是会在登陆控件的下方,我要的效果是和登陆控件在同一行上靠右
那如果想在登录控件的右边某个地方放一个控件,该怎么实现 展开
<asp:Login ID="Login1" runat="server">
<LayoutTemplate>
<label>UserName: </label>
<asp:TextBox runat="server" ID="UserName" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" ControlToValidate="UserName"></asp:RequiredFieldValidator>
<label>Password: </label>
<asp:TextBox ID="Password" runat="server"></asp:TextBox><asp:RequiredFieldValidator
ID="RequiredFieldValidator2" runat="server" ErrorMessage="*" ControlToValidate="Password"></asp:RequiredFieldValidator> 
<asp:Button ID="Button1" runat="server" Text="Login" CommandName="Login"/>
<br />
; <asp:CheckBox ID="CheckBox1" runat="server" Text="Remember me next time"/>
&<asp:HyperLink ID="HyperLink1" runat="server" Font-Underline="true" NavigateUrl="~/PasswordRecover.aspx">Forget your password?</asp:HyperLink>
</LayoutTemplate>
</asp:Login>
<asp:Button ID="Button2" runat="server" Text="Button" />
</div>
最下面这个按扭总是会在登陆控件的下方,我要的效果是和登陆控件在同一行上靠右
那如果想在登录控件的右边某个地方放一个控件,该怎么实现 展开
4个回答
展开全部
在这里用table是最方便的,div太麻烦了。
<table>
<tr>
<td>
login控件部分
</td>
<td>
button部分
</td>
</tr>
</table>
<table>
<tr>
<td>
login控件部分
</td>
<td>
button部分
</td>
</tr>
</table>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
用下面试试看
<div id="loginhead">
<table>
<tr>
<td>
<asp:Login ID="Login1" runat="server">
<LayoutTemplate>
<label>UserName: </label>
<asp:TextBox runat="server" ID="UserName" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" ControlToValidate="UserName"></asp:RequiredFieldValidator>
<label>Password: </label>
<asp:TextBox ID="Password" runat="server"></asp:TextBox><asp:RequiredFieldValidator
ID="RequiredFieldValidator2" runat="server" ErrorMessage="*" ControlToValidate="Password"></asp:RequiredFieldValidator>
<asp:Button ID="Button1" runat="server" Text="Login" CommandName="Login"/>
<br />
; <asp:CheckBox ID="CheckBox1" runat="server" Text="Remember me next time"/>
&<asp:HyperLink ID="HyperLink1" runat="server" Font-Underline="true" NavigateUrl="~/PasswordRecover.aspx">Forget your password?</asp:HyperLink>
</LayoutTemplate>
</asp:Login>
</td>
<td>
<asp:Button ID="Button2" runat="server" Text="Button" />
</td>
</tr>
</table>
</div>
<div id="loginhead">
<table>
<tr>
<td>
<asp:Login ID="Login1" runat="server">
<LayoutTemplate>
<label>UserName: </label>
<asp:TextBox runat="server" ID="UserName" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" ControlToValidate="UserName"></asp:RequiredFieldValidator>
<label>Password: </label>
<asp:TextBox ID="Password" runat="server"></asp:TextBox><asp:RequiredFieldValidator
ID="RequiredFieldValidator2" runat="server" ErrorMessage="*" ControlToValidate="Password"></asp:RequiredFieldValidator>
<asp:Button ID="Button1" runat="server" Text="Login" CommandName="Login"/>
<br />
; <asp:CheckBox ID="CheckBox1" runat="server" Text="Remember me next time"/>
&<asp:HyperLink ID="HyperLink1" runat="server" Font-Underline="true" NavigateUrl="~/PasswordRecover.aspx">Forget your password?</asp:HyperLink>
</LayoutTemplate>
</asp:Login>
</td>
<td>
<asp:Button ID="Button2" runat="server" Text="Button" />
</td>
</tr>
</table>
</div>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
或者是用table 布局一下啊
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询