How to pass CheckBox Values(1/0 ) to another page?

Discussion in 'ASP .Net' started by Patrick Olurotimi Ige, Jun 12, 2005.

  1. I want to insert checkbox Y/N or 1/0 into a SQL table. I know i can do
    that using a bit field or Char field.

    My Question is i have Datalist that lists products and i want to put
    this checkBoxes in the Datalist.
    But in the Datalist there is a Link that adds the Products to a SQL
    table My Datalist looks like this below:-

    <asp:datalist id="MyList" runat="server" RepeatColumns="2">
    <ItemTemplate>
    <asp:CheckBox ID="MessageBank" Runat="server"
    Text="MBank"></asp:CheckBox>

    <a href='AddToProduct.aspx?productID=<%#
    DataBinder.Eval(Container.DataItem, "ProductID") %>'>
    <font color="#9D0000"><b>Add To Product<b></font></span>
    </ItemTemplate>
    </asp:datalist>

    So if the User Clicks the AddToProduct link its inserts the ProductID
    and the rest of the Product thats binded to it.

    But my problem here is how to pass what the user has selected in the
    CheckBoxes to AddToProduct so that it can be inserted to the table.

    Note that AddToCart only inserts the Products and get redirected to a
    page where all the products added are listed.

    What 'm trying to do is maybe have a user select the checkboxes in a
    different page and then pass the values 1 or 0 to the AddToProduct page?

    Any ideas?





    *** Sent via Developersdex http://www.developersdex.com ***
     
    Patrick Olurotimi Ige, Jun 12, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Salman Iqbal
    Replies:
    2
    Views:
    802
    Plato
    Oct 3, 2003
  2. Martin Tully

    Pass Values to another page.

    Martin Tully, Jul 24, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    450
    Martin Tully
    Jul 24, 2003
  3. Replies:
    4
    Views:
    22,307
    Mirunalini
    Jun 24, 2011
  4. Replies:
    1
    Views:
    564
    John Saunders
    Sep 29, 2008
  5. Terje
    Replies:
    5
    Views:
    384
    Evertjan.
    Nov 18, 2004
Loading...

Share This Page