【发布时间】:2019-03-02 16:33:52
【问题描述】:
我正在开展一个项目,我正在为管理员创建仪表板。 我有一个 UsersGridView,其中显示了注册用户的数据。 使用 Gridview 的 Template 字段,我创建了一个按钮,允许 Admin 使用 Lockout 或 允许用户使用系统。
<asp:TemplateField HeaderText="LockoutStatus">
<ItemTemplate>
<asp:Button ID="LockoutStatus" runat="server" CausesValidation="false" CommandName="LockoutStatus" Text="Enabled"
CommandArgument='<%# Eval("Id") %>' />
</ItemTemplate>
</asp:TemplateField>
在 RowCommand 事件中,如果用户被系统锁定,我该如何更改按钮 CssClass 和文本。
【问题讨论】:
标签: css asp.net button gridview webforms