Articles → ASP .NET MVC → Partial Views In Asp.Net MVC

Partial Views In Asp.Net MVC

Creation Of Partial Views

  1. Right click on the view\shared folder and click on Add – View..
  2. Picture showing Add -> View... option in context menu
    Click to Enlarge

  3. Add View’ appears, check on ‘Create as partial view’ checkbox as shown in the following figure
  4. Picture showing the popup window to add new view
    Click to Enlarge

  5. Click on ‘Add’. A partial view will be added in shared folder.
  6. Inside the partial view class, add following code
  7. <table>
          <td><a href="" target="_blank">Google</a></td>
          <td><a href="" target="_blank">Bing</a></td>

Adding Partial View In The View

ViewBag.Title = "Home Page";


Picture showing the output of partial views in mvc
Click to Enlarge

Posted By  -  Karan Gupta
Posted On  -  Thursday, September 24, 2015


Your Email Id  
Query/FeedbackCharacters remaining 250