Always checked ASP.net.
<asp:CheckBox ID="isSubscribed" runat="server" /> Subscribe to mailing list?<br /><br /> <asp:Button runat="server" CssClass="btn" ID="btnPrefUpdate" OnClick="updatePrefs" Text="Update" /><br /><br /> This fires in the code behind:
protected void updatePrefs(object sender, EventArgs e) { Response.Write(isSubscribed.Checked); Response.End(); } But it always looks like the truth! Is it checked or not! I know that I am doing it wrong, can someone show me how to properly access this value?
You are doing it right. The boolean property of Checked should just say True or False (I even checked it). Does your Page_Load do something with a checkbox? In other words, this is the value of the flag set ever (re) when feedback occurs (button link back).
In your Page_Load method, you can include:
if (!this.IsPostBack) { // Set default or loaded values for controls }