Solved

How do I update/insert a checkbox value from a formview template ?

Posted on 2011-03-08
1
386 Views
Last Modified: 2012-05-11
Hi;

I am a bit confused about how to update a database boolean column.

You would normally do two way databinding for most controls except for he checkbox control.

It is my understanding is that because of the AUTOPOSTBACK property  then following code will update / create a vaule in the boolean column.

<asp:CheckBox ID="TxDueChkBox" runat="server" Checked='<%# Eval("TaxDue") %>' Text="Tax Due"  AutoPostBack="true"/>

Is this correct ?
0
Comment
Question by:gggoddard
1 Comment
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 500 total points
Comment Utility
Use Bind instead of Eval

<asp:CheckBox ID="TxDueChkBox" runat="server" Checked='<%# Bind("TaxDue") %>' Text="Tax Due"  AutoPostBack="true"/>

0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now