I want to disable the button that is contained in a data list row. Is it possible to disable the button after it has been clicked once by the user? If so, can someone please suggest how I can achieve that.
<asp:DataList ID="DataList1" runat="server" DataKeyField="Qno" OnItemCommand="DataList1_OnItemCommand"
DataSourceID="SqlDataSource1">
<ItemTemplate> <asp:RadioButton ID="RadioButton1" runat="server" Text='<%# Eval("Ans1") %>' GroupName="qu" />
<br />
<asp:RadioButton ID="RadioButton2" runat="server" Text='<%# Eval("Ans2") %>' GroupName="qu" /> <asp:Button ID="Button2" runat="server" Text="Submit" CommandName="Validate" />
<br />
</ItemTemplate>
I have nothing to do with ASP, but if you want javascript (jQuery) solution then you can just do something like
(of course add class “once-clickable-button” to the button or chose the name that suits you)