Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

215
Views
What to do with @RenderBody()?

I have an ASP.NET MVC 3 application with JQuery UI Tabs. I have a master layout page _layout.cshtml, code below. The master _layout.cshtml requires a @RenderBody() code. Since it is required, what am I supposed to do with it. I guess where I'm going with this is I do not know if I'm doing this correctly, since I'm not using it.
Should I be and what are the problem if not ?
Thanks.

 <div class="page">
        <div id="title" style=" height:120px" >                
            <img alt="Test.com" src="/Content/images/TestLogoLeft.png" style="width:370px; float:left; margin:0px;" />
        </div>

        <div id="titleRight" style=" background-color:White; width:580px; height:120px; float:right;"></div>

        <div id="menu" style=" background-color:White; width:950px; height:400px; float:left;">

            <!-- Must have class= info to prevent flash of just content on refresh -->
            <div id="tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all" style=" position:relative; border:0px;"   >
                <ul class="ui-tabs-nav">                        
                    <li><a href="#tabs-1" >Home</a></li>                        
                    <li><a href="#tabs-2" >Statistics</a></li>
                    <li><a href="#tabs-3" >Maps</a></li>
                    <li><a href="#tabs-4" >FAQs</a></li>
                    <li ><a href="#tabs-5">Login</a></li>
                    <li ><a href="#tabs-6">SignUp</a></li>
                </ul>
                <div id="tabs-1" class="ui-tabs-hide ui-tabs-panel">@Html.Partial("../Home/Home") </div>
                <div id="tabs-2" class="ui-tabs-hide ui-tabs-panel">@Html.Partial("../Statistics/Statistics")</div>
                <div id="tabs-3" class="ui-tabs-hide ui-tabs-panel">@Html.Partial("../Maps/Maps")</div>
                <div id="tabs-4" class="ui-tabs-hide ui-tabs-panel">@Html.Partial("../Home/FAQs")</div>                                     
               <div id="tabs-5" class="ui-tabs-hide ui-tabs-panel">@Html.Partial("../Account/LogOn")</div>                                                        
               <div id="tabs-6" class="ui-tabs-hide ui-tabs-panel">@Html.Partial("../Account/Register")</div> 

            </div>               
        </div>               
 </div>


 @* TODO: I need to figure out what to do with this  *@        
<div id="main" style=" display:none">
    @RenderBody()           
</div>      
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

The @RenderBody call will render the content of your actual view.
You should put it wherever you want the view's content to be.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!