How can I loop checkbox selections

FatalErr0r

New Member
Hey guys just a quick background on what I'm trying to do. I have an webforms project that I am working on. Users will select from a variety of images they want to generate and then this will take them to a page I have set up to print from. My question really is how can I make it so when they select for example 5 check boxes a counter is created. I need to do this because I need the value of the items they selected(name and Id) so that I can run it through my rendor method for each item they select. Any insight would be awesome, if I need to clarify anything or provide code let me know. Thank you!\[code\]<!DOCTYPE html><!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--><!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--><!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--><!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="HandheldFriendly" content="True" /><meta name="MobileOptimized" content="320" /><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> <link href="http://stackoverflow.com/questions/Style/bootstrap.min.css" rel="stylesheet" /> <link href="http://stackoverflow.com/questions/Style/bootstrap-responsive.min.css" rel="stylesheet" /> <link rel="stylesheet" href="http://stackoverflow.com/questions/responsive.css" /> <link href="http://stackoverflow.com/questions/Style/custom.css" rel="stylesheet" /> <script src="http://code.jquery.com/jquery-1.9.1.min.js" type="text/javascript"></script> <script src="http://stackoverflow.com/questions/Scripts/bootstrap.min.js"></script> <script src="http://stackoverflow.com/questions/Scripts/modernizr-2.6.2-respond-1.1.0.min.js"></script> <style> body { padding-top: 60px; padding-bottom: 40px; } </style><title> Tag Manager - Microsoft Tagger</title></head><body> <!--[if lt IE 7]> <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p> <![endif]--> <div class="navbar navbar-inverse navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <a class="brand" href="http://stackoverflow.com/index.aspx">Microsoft Tagger</a> <div class="nav-collapse collapse"> <ul class="nav"> <li class="active"><a href="http://stackoverflow.com/index.aspx">Home</a></li> <li><a href=http://stackoverflow.com/questions/15856207/AddDevice.aspx>Create Tags</a></li> <li><a href="Tagmanager.aspx">Tag Manager</a></li> <li><a href="http://stackoverflow.com/Pages/AddUsers/">User Management</a></li> <li><a href="http://stackoverflow.com/questions/15856207/Settings.aspx">Settings</a></li> </ul> <p class="navbar-form pull-right"><a id="Login" class="btn" href="http://stackoverflow.com/Pages/Login">Sign in</a></p> </div><!--/.nav-collapse --> </div> </div> </div> <form method="post" action="Tagmanager.aspx" id="form1"><div class="aspNetHidden"><input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" /><input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" /><input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS" value="" /><input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="http://stackoverflow.com/questions/15856207/kySKwYuYhADD7C7+Jm7X9fUBwjV+kIHbMCI0kvXuSfynnBUPeh4pnGsODmU3CAfbMp1TeQ8r8F9jt9/QJRshNrAFDPrHwcvFsa0P1B47SvP0R4o5mzuybq/mD3zJJndCYd2fJsQIKewHI1K4KSaLK26prYNaJEM6+czXb7Tb1CwnOKg/T2YePZ74nbS4655EF12gaSG4A54rsMmjQUjjLzZ7OZ5CKXvKh3Rd3c9PBQTDpcmIzBdahQNzjydsJEhQCNAizCaH0rXEcgkL1OzIjyyfqD+O0LiK7CxtJ53xgMjtSIO/KEqJ9Wk0lssvfj6wPWxa7/y+r3oRH4XyAqtS3UisNvouSTEBb1skfXjgeaw8Xmyivx4JurRPZW+6qn4tEYrO6HjZ3HPXy2F2JjSS2V7YLS5An7no2hKl7W+nDQxQS+ghVEj5REyXSl1g/GBnYHbAM2L37070hVrv0UjItBVIp8wPdBkU70utht2ax2K3K99l6IF2M3d1ruMROiIPJKPy8pFZfN51cUyw36X5cRCMaotCGia88ebTUn2HbWx5Ehjv2dNRkRRG6zVe5HuuOiBGPgcuDKQyS/r/PtuwGegDEGnS+sXICji2fX58lxpSvuIQkKb4Z3UItbesK3pdBTn9JwHyOgQZLJtV7l6lmoUOoC+PQ7Xtk1AViPJG41aSlbY5F+9ufVM6+LtkTLMoGHHDdrLI0xwn1h+iuh1mrWObUy+WMbmr2Jw89f+YHD0kuM9bjwXgeDM7wJvTSpDDjJwiFG0JGXBBBAv4QEtitDSOaZDwbTukpnX1iUHaaaWb/OGdcQXPdzhjftBlFqNPxHtFl6kAtfsW8k+azjKYt+KWrn5JA8fa5r9HVWhBt0UuTbva2JFZSniVC6HBu1azifl6u/U4zOftyeEm83Qvkau0KhqmohRXNMQQpnGNXcFwCUWSgo7kSCWlkUXyhfq4G9SiJkaSS/h/DFzXy7RxA9COWWZkPcFxkDIL5u/vjTJEa3ZNEP5mjQocDSOXvXXZ2Mk2DIVuR9rPc+VNxh/WD7ocNcoNGtT7JDxy7r7sreVcu0/WGoMdM4e2BaR9CUFzM6i1KC3zHLeyK1T+ObeVBapwzmFZmtqJrgd7gQmxjjhsoipQzeiCXVhONL5rRuEY9Qew6qwBCT69oJchNx6yvw==" /></div><script type="text/javascript">//<![CDATA[var theForm = document.forms['form1'];if (!theForm) { theForm = document.form1;}function __doPostBack(eventTarget, eventArgument) { if (!theForm.onsubmit || (theForm.onsubmit() != false)) { theForm.__EVENTTARGET.value = http://stackoverflow.com/questions/15856207/eventTarget; theForm.__EVENTARGUMENT.value = eventArgument; theForm.submit(); }}//]]></script><div class="aspNetHidden"> <input type="hidden" name="__VIEWSTATEENCRYPTED" id="__VIEWSTATEENCRYPTED" value="" /> <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="http://stackoverflow.com/questions/15856207/0U4EGzWCcoTaWrHPEXFALcyG6KeUGI5GzpVV1Quz301fDa3jk60YWGJFj9oyrhtGDQH0ePQh4WaGqNELyjnORNWQ9hnQ+XXnNPk2CbYzJPDboBMa8xsieJfP7kX16ZH/1Q1Mt+s7B1Zt96GBDByuGCYapMWTWE98P++r1iMP/t584oI6LrnBugV6Vd/KNp57q1Z7ynCsD7xE/hVjlPlIromSrxk36YUgYsaEBE3uSYUpIotu1r+LIhRCLGcaf0Pytoto5/Hqm7jWZaqcAzWFFOPbKtskfvkw2iPY8hbUXLI=" /></div> <div class="container"> <br/><br /> <select name="ctl00$ContentPlaceHolder1$ddListDeviceType" onchange="javascript:setTimeout('__doPostBack(\'ctl00$ContentPlaceHolder1$ddListDeviceType\',\'\')', 0)" id="ContentPlaceHolder1_ddListDeviceType"> <option selected="selected" value="http://stackoverflow.com/questions/15856207/0">All</option> <option value="http://stackoverflow.com/questions/15856207/2">Desktop</option> <option value="http://stackoverflow.com/questions/15856207/3">Laptop</option> <option value="http://stackoverflow.com/questions/15856207/4">Tablet</option> <option value="http://stackoverflow.com/questions/15856207/5">Other</option></select> <div> <table class="table table-bordered table-hover" cellspacing="0" rules="all" border="1" id="ContentPlaceHolder1_gvProducts" style="border-collapse:collapse;"> <tr> <th scope="col">Name</th><th scope="col">Location</th><th scope="col">Status</th><th scope="col">Product Type</th><th scope="col">Options</th><th scope="col">Options</th><th scope="col">&nbsp;</th> </tr><tr> <td>Surface RT</td><td>Device Bar</td><td>Inactive</td><td>Tablet</td><td><a class="btn btn-primary" href="http://stackoverflow.com/questions/15856207/EditPage.aspx?id=10">Edit</a></td><td><a class="btn btn-danger" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$gvProducts','Delete$0')">Delete</a></td><td> <input value='http://stackoverflow.com/questions/15856207/Surface RT,QsTD4zibjE' type="checkbox" /> </td> </tr><tr> <td>Dell Desktop</td><td>Device Bar</td><td>Active</td><td>Desktop</td><td><a class="btn btn-primary" href="http://stackoverflow.com/questions/15856207/EditPage.aspx?id=11">Edit</a></td><td><a class="btn btn-danger" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$gvProducts','Delete$1')">Delete</a></td><td> <input value='http://stackoverflow.com/questions/15856207/Dell Desktop,sg49r6lnm0' type="checkbox" /> </td> </tr><tr> <td>VAIO Duo 11 Ultrabook</td><td>Device Bar</td><td>Active</td><td>Tablet</td><td><a class="btn btn-primary" href="http://stackoverflow.com/questions/15856207/EditPage.aspx?id=17">Edit</a></td><td><a class="btn btn-danger" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$gvProducts','Delete$2')">Delete</a></td><td> <input value='http://stackoverflow.com/questions/15856207/VAIO Duo 11 Ultrabook,zz3JBGxdIU' type="checkbox" /> </td> </tr> </table></div> <hr>enter code here <footer> <p>&copy; Company 2012</p> </footer> </div> </form></body></html>\[/code\]
 
Top