c# - 登录按钮样式属性

标签 c# asp.net vb.net

我正在使用这个登录控件:

<asp:Login runat="server"  
id="BlogLogin"  UserNameLabelText="Username"  TitleText="" 
MembershipProvider="EktronMembershipProvider" LoginButtonText="Login" RememberMeText="Remember Me" Font-Bold="true"
DisplayRememeberMe="False">   
</asp:Login>

我正在尝试将 loginbuttonstyle 属性设置为左对齐,因为默认情况下它是右对齐的。我在这里看不到太多选项可以将对齐方式设置为左对齐。 我该怎么做?

谢谢

最佳答案

您可以设置 LoginButtonStyle-CssClass 属性,并在您的 css 中为您指定的类提供 float:left 样式

<asp:Login id="BlogLogin" runat="server"  
    UserNameLabelText="Username" 
    TitleText="" 
    MembershipProvider="EktronMembershipProvider"  
    LoginButtonText="Login"  
    RememberMeText="Remember Me"  
    Font-Bold="true"
    DisplayRememeberMe="False"
    LoginButtonStyle-CssClass="login-button"><!-- <<< add this attribute -->
</asp:Login>

然后在你的CSS中:

.login-button {float:left;}

关于c# - 登录按钮样式属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7000042/

相关文章:

c# - _IContactsAndGroupsCallback.OnLookUp

asp.net - 静态定义控件或在页面加载时动态创建控件的主要区别是什么?

c# - OLEDB 中的 IN 运算符

.net - 在 Entity Framework 事务中使用 SqlConnection

c# - .NET 代码访问安全性中的 "ApplicaionDirectory"成员条件意味着什么?

vb.net:在字符串中查找字符串的位置?

c# - 编辑包含引号的注册表字符串

c# - ListBox VirtualizingStackPanel.VirtualizationMode ="Recycling"在 Windows Phone 7.5 中不起作用

c# - 在执行 spsitedataquery 后获取项目来自的子站点

javascript - 显示用户刚刚选择的图片?