[RESOLVED]How to save and display Multiple responsiblities of data into a single record

i want to manage the job posting data in website. here i am creating a page to insert the job requirement details into database and display in a webpage .

every thing is fine but when came to reponsibilities. their may be many more responsibulities for a particular job . here i  want to save it in a single column in database

but i want to display in a page in a listed format how can i save and retrieve this responsibilites columns. now every thing is in static so i am trying it to dynamic from database.

i want ot display in a format like this

<tr>
                                            <td valign="top"><p><b>Responsibilities</b></p></td>
                                            <td valign="top"><p><b>:</b></p></td>
                                            <td>
                                                <p>
                                                    <ul style="padding-left:30px;">
                                                        <li>Strong Java skills with extensive knowledge of the Android SDK.</li>
                                                        <li>Object Oriented PHP skills at all scales.  </li>
                                                        <li>Exceptional organizational & project management skills.</li>
                                                        <li>Demonstrated success in defining & launching mobile apps.</li>
                                                    </ul>
                                                </p>
                                            </td>
                                        </tr>

please give me some suggestions so how can i save it in a single column and how can rearrange it in a form look like above format

Assume that you are storing the responsibilities in a single column with comma separation

<tr>
    <td valign="top"><p><b>Responsibilities</b></p></td>
    <td valign="top"><p><b>:</b></p></td>
    <td>
        <p>
            <ul style="padding-left:30px;">

                @{
                    
                    string[] resps = Model.Responsibilities.Split(",".ToCharArray());
                    foreach(string resp in resps)
                    {
                         <li>@resp</li>
                    }
                    
                }
              
            </ul>
        </p>
    </td>
</tr>

Hi Siva,

First, please refer to cnuonline’s reply. You’d better use the special separator (E.g @#).

Secondly, to save the data, you could use
String.Join
method to combine the values.

On the other hand, in my opinion, it’s better to store the responsibilities data to another table. (One to many)

Best Regards

Starain Chen

Leave a Reply