Sunday, October 31, 2010

MVC Partial View


Partial View

       Partial view is used to render a section of view content. 


                 it is accessed by "Partial" and "RenderPartial" helper in view.


Point to Remember-

 1.It is just like a user control web form application. it is used for code re-usability.
2.It helps us to reduce code duplication. In other word a partial view enables us to render a view within the parent view.

It is best practice to create partial view in the shared folder and partial view name is preceded by "_", but it is not mandatory. The "_" before view name specify that it is a reusable component i.e. partial view. 
 


HTML Table



  <table border="1" cellspacing="1"  style="background-color:yellow;border-color:blue;">
        <tr>
            <th colspan="8">TIME TABLE</th>
        </tr>

        <tr>
            <th>DAYS</th>
            <th>1</th>
            <th>2</th>
            <th>3</th>
            <th rowspan="7">lunch break</th>
            <th>4</th>
            <th>5</th>
            <th>6</th>
        </tr>
        <tr>
            <td>MONDAY</td>
            <td>Accounts</td>
            <td>English</td>
            <td>Statistics</td>
            <td>Banking</td>
            <td align="center">-</td>
            <td align="center">EP</td>
        </tr>
        <tr>
            <td>TUESDAY</td>
            <td>Statistics</td>
            <td>Banking</td>
            <td>English</td>
            <td>Accounts</td>
            <td align="center">-</td>
            <td align="center">-</td>
        </tr>
        <tr>
            <td>WEDNESDAY</td>
            <td>English</td>
            <td>Statistics</td>
            <td>Accounts</td>
            <td align="center">EP</td>
            <td>Banking</td>
            <td align="center">-</td>
        </tr>
        <tr>
            <td>THURSDAY</td>
            <td align="center">-</td>
            <td align="center">CA</td>
            <td>Statistics</td>
            <td>English</td>
            <td align="center">EP</td>
            <td align="center">-</td>
        </tr>
        <tr>
            <td>FRIDAY</td>
            <td>Banking</td>
            <td>Statistics</td>
            <td>English</td>
            <td colspan="2" align="center">ICT</td>
            <td align="center">CA</td>
        </tr>
        <tr>
            <td>SATURSDAY</td>
            <td>Banking</td>
            <td align="center">CA</td>
            <td>Statistics</td>
            <td colspan="2" align="center">English</td>
            <td>Accounts</td>
        </tr>

    </table>

No comments:

Post a Comment

MVC Partial View

Partial View        Partial view is used to render a section of view content.                   it is accessed by "Partial" and ...