Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 17th, 2006, 12:08 PM
Authorized User
 
Join Date: Feb 2006
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default Updating boolean values using datalist

Hi, perhaps someone can help me with this, or suggest an alternative way of getting it done...

I have a checkbox that is part of a datalist. A snippet of my code is as follows:

Code:
<asp:datalist id="mydataList" runat="server" repeatDirection="Horizontal" RepeatLayout="Flow">
    <ItemTemplate>
        <asp:checkbox ID="chkBookmark" Visible="True" Runat="server" Text='Bookmark' checked='<%# DataBinder.Eval(Container.DataItem, "Bookmark") %>' autopostback=true  OnCheckedChanged="testing">
    </ItemTemplate>
</asp:datalist>
My problem now is in writing the testing sub-routine...
I need to write the new updated checkbox value back to the database that I have bound the datalist to.

I've tried using the following:

Code:
Protected sub testing(ByVal sender As Object, ByVal e As System.EventArgs)
However, I'm stuck as I do not know how to get the required information like which is the affected row and etc.

I know how to get around this problem using command buttons, but that would be my last resort as I would want to use the checkbox instead.

Any help is greatly appreciated.

Thanks.


Scripts82
__________________
Scripts82
 
Old September 20th, 2006, 04:17 AM
Authorized User
 
Join Date: Feb 2006
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hmm... no reply thus far... guess i did not phrase my questions properly for anyone to understand correctly... anyway problem solved...

Scripts82





Similar Threads
Thread Thread Starter Forum Replies Last Post
Datalist not Updating.. slim182 ASP.NET 2.0 Basics 0 February 16th, 2007 12:48 PM
DataList HELP with Updating zoltac007 ASP.NET 2.0 Basics 0 February 16th, 2007 03:47 AM
Displaying Boolean Values from Datagrid rstelma ASP.NET 1.0 and 1.1 Professional 10 January 9th, 2006 01:48 AM
How do I send boolean values with a checkbox babou SQL Server ASP 2 March 28th, 2005 05:43 AM
accesing values in DataList miguel.ossa ASP.NET 1.0 and 1.1 Basics 7 March 8th, 2004 09:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.