By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,247 Members | 1,989 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,247 IT Pros & Developers. It's quick & easy.

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

P: n/a
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 ***
Nov 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.