• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • Last Modified:

checkbox and textbox insertion in asp.net

I have a pdf file which show:

Required. Check the appropriate level of SSI from the list
___Superficial incisional primary (SIP)
___Superficial incisional secondary (SIS)
___Deep incisional primary (DIP)
___Deep incisional secondary (DIS)
___ Organ/space: __

For this I made a serie of separated checkbox controls and texbox control.
The problem I am having is, the user can only choose one option , bu id the choose the last (Organ/Space, then they can add more information into that selection and then send out to the database)..

My code so far looks like the one below, can someone give some ideas how to do this
<td colspan="2" style="height: 30px">
            <span style="color: #FF0000">*</span> Specific Events<br />
            <asp:CheckBox ID="eventdetailsSSI1" runat="server" Text="SIP" />
            Superficial Incision Primary (SIP)<br />
            <asp:CheckBox ID="eventdetailsSSI2" runat="server" Text="SIS" />
            Superficial Incision Primary (SIS)<br />
            <asp:CheckBox ID="eventdetailsSSI3" runat="server" />
            Organ/Space (specify site):&nbsp;
            <asp:TextBox ID="eventdetailsSSI3Extra" runat="server"></asp:TextBox>
        <td colspan="2" style="height: 30px">
            <asp:CheckBox ID="eventdetailsSSI4" runat="server" Text="DIP" />
            &nbsp;Incisional Primary (DIP)<br />
            <asp:CheckBox ID="eventdetailsSSI5" runat="server" Text="DIS" />
            &nbsp;Deep Insisional Secondary (DIS)</td>

cs code behind
// If stSSI3 selected then look for extra value eventdetailsSSI3Extra and concatenate

        string stSSI3 = eventdetailsSSI3.Text;
        string st8 = eventdetailsSSI3Extra.Text;
        string stSSI3All = stSSI3 + (string.IsNullOrEmpty(st8) ? string.Empty : "," + st8);

        string stSSI4 = eventdetailsSSI4.Text;
        string stSSI5 = eventdetailsSSI5.Text;

Open in new window

1 Solution
Just add onclick handler to last checkbox, that will enable/disable textbox field.
TonyRebaAuthor Commented:
How would I go on the code behind for inserting both the

cs code behind

// If stSSI3 checkbox is checked then look for extra value eventdetailsSSI3Extra and concatenate for insert the parameter...


Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now