Below is gridview that I want it to be, ID, Name and Status are Label, Action is LinkButton
ID ------------- Name ------------- Status ------------- Action
1 -------------- Name1 ------------ Active ------------ Disable
2 -------------- Name2 ------------ In-active --------- Enable
3 -------------- Name3 ------------ Active ------------ Disable
How can I set the LinkButton Text to "Disable" or "Enable" depend on value (text) of Status (which is always either Active or In-active)?
My link button is as below, how can change the text 'Do you want to proceed' to 'Do you want to Disable' or 'Do you want to Enable' base on the logic above
<asp:LinkButton ID="lbtAction" runat="server"
CommandArgument='<%# Eval("ID")%>'
OnClientClick="return confirm('Do you want to proceed?')"
OnClick="DoAction"></asp:LinkButton>
RowDataBoundand place your logic there.RowDataBoundevent