Binding 2 group user using checkbox

hossein2801

New Member
http://imageshack.us/photo/my-images/832/capture1ga.jpg/http://imageshack.us/photo/my-images/9/capture2mf.jpg/\[code\] <div class="editor-field" style="margin-left:60px"> @Html.Label("", "User Group ID") @Html.TextBox("username", string.Empty, new { @placeholder = "Select Group ID..." }) Group User<input style="margin-left: 30px"; type="checkbox" name="isuser" id="isuser" value="http://stackoverflow.com/questions/15659305/true" /></div> <div class="editor-field" style="margin-left:50px"> @Html.Label("", "Zone Section ID") @Html.TextBox("groupname", string.Empty, new { @placeholder = "Select Zone..." }) Group section<input style="margin-left: 16px"; type="checkbox" name="iszonesection" id="iszonesection" value="http://stackoverflow.com/questions/15659305/true" /></div>\[/code\]where I am trying to combine 2 textboxes to display either "username" or "groupname" when the checkbox is checked. "username" list is active by default. and right now I can omly display them in 2 different textbox please refer to the screenshot. Please show me a good approach on this problem. Thank you
 
Back
Top