?
Solved

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

Posted on 2011-03-08
1
Medium Priority
?
416 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 2000 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

800 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