Solved

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

Posted on 2011-03-08
1
403 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 500 total points
ID: 35075527
Use Bind instead of Eval

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

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

717 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