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

  • Thread starter Patrick Olurotimi Ige
  • Start date
P

Patrick Olurotimi Ige

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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top