Visitors of the website can vote to either Agree or Disagree. The LinkButtons' text contains data (an integer, the amount of votes) extracetd from an SQL Server Database. When you Agree, the amount of Agrees in the database increases by one and the specific
LinkButton's text should display this updated integer, and both LinkButtons should be disabled.
frmeyer
Member
19 Points
67 Posts
Re: How to Databind ListView without enabling LinkButtons
Apr 14, 2012 06:13 PM|LINK
Okay.
The LinkButtons:
<asp:LinkButton ID="Agree" runat="server" OnClick="LinkButton_Click" CommandName="Agree" CommandArgument='<%# Eval("ID") %>' >Agree(<%# Eval("Agrees")%>)</asp:LinkButton> <asp:LinkButton ID="Disagree" runat="server" OnClick="LinkButton_Click" CommandName="Disagree" CommandArgument='<%# Eval("ID") %>'>Meh...(<%# Eval("Disagrees")%>)</asp:LinkButton>Visitors of the website can vote to either Agree or Disagree. The LinkButtons' text contains data (an integer, the amount of votes) extracetd from an SQL Server Database. When you Agree, the amount of Agrees in the database increases by one and the specific LinkButton's text should display this updated integer, and both LinkButtons should be disabled.
Example:
Agree(0) Disagree(0)
If the Agree LinkButton is clicked:
Agree(1) Disagree(0) ----LinkButtons disabled
databind listview LinkButton