Click here to Skip to main content
15,902,032 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
dear all,
i am using input control for checkbox and also define name same for all the input but after all it check all the check and i want to check only on one time if i check another then it unchek.
please help me.

VB
str &= "    <tr>" 'sport person
         str &= "      <td><label>ApplicantSportPerson<font color='#ff7100'>&nbsp;*</font></label>"
         str &= "      </td>"
         str &= "      <td colspan='3'>"
         str &= "        <input type='checkbox' name='Sport' value='1'  />Yes "
         str &= "            <div class='divError' id='divSportPerson_" & i & "' style='display: none'>"
         str &= "               <img src='images/error.gif' />Please select Applicant Sport Person...</div> "
         str &= "      </td>"
         str &= "    </tr>"

it is use in div conlol.
VB
divsportdetails.InnerHtml = str
Posted
Comments
Jim Jos 28-May-12 8:05am    
Hello Boss If you want one selection in a group you should use radio button not checkbox.. Radio button Name attribute is the group attribute
DINESH K MAURYA 28-May-12 8:43am    
thanks i try it..

1 solution

HI,
If you have to only one choice then you must use radio button and set group name same in all radio button which through create one group of radio button.
Try it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900