| hi I have a datalist with som controls in it, one of them is check box, i want have a compare with two item(click 2 checkboxes, for comparing two product in my websit) so when checked two of them and user push compareBtn my codes go to another page with 2 valu (productId) how to do it |
Loading
Dhanunjay JajimogglaPosted Jun 13, 2014, 12:04 AM
if(Count of checked boxes == 2)
{
marjan ghPosted Jun 11, 2014, 7:48 AM
Dhanunjay JajimogglaPosted Jun 10, 2014, 4:48 AM
Whenever user checked more than 2 check boxes,you will be display one Alert message.
marjan ghPosted Jun 10, 2014, 3:33 AM
Dhanunjay JajimogglaPosted Jun 10, 2014, 3:27 AM
Follow below examples,
http://www.c-sharpcorner.com/uploadfile/bryianTan/Asp-Net-get-selected-checkbox-value-in-datalist/
Or
http://www.codeproject.com/Articles/206415/ASP-NET-Get-selected-checkbox-value-in-DataList
In this Examples you have to see how to get the Checked check box values in Datalist. So after geeting the Product Ids, same as below.
Whenever user checked two check boxes--->you have to maintain the Product Ids in session object or Pass through query string.while loading another page, get the both product details from database with help of Product Ids and bind the particular data control.
marjan ghPosted Jun 10, 2014, 12:44 AM
i have a datalist that its content is my products
i put checkbox in it for checking 2 of them
so when checked 2 , i pass productId to another page
in next page i get productIds and show their feature
can u give me a sample?
Dhanunjay JajimogglaPosted Jun 9, 2014, 1:21 AM
marjan ghPosted May 31, 2014, 8:07 AM
how can i use this sample
marjan ghPosted May 31, 2014, 7:42 AM
how can i access in datalist?
Dhanunjay JajimogglaPosted May 31, 2014, 7:12 AM
Whenever user checked two check boxes--->you have to maintain the Product Ids in session object.while loading another page, get the both product details from database with help of Product Ids and bind the particular data control.
Please provide the some more clarity.
See example : http://www.c-sharpcorner.com/uploadfile/syedshakeer/checkbox-in-gridview/
Best Regards,
Dhanunjay.