I want to load div sections to RTE content dynamically
I try to do it something like this ,
- @model IEnumerable<int>
- @{
- ViewBag.Title = "Create Templat";
- }
- <!DOCTYPE html>
- <html>
- <head>
- <title>Create a Template</title>
- </head>
- <body>
-
- @using (Html.BeginForm())
- {
-
- <div>
- @Html.Raw(ViewBag.Editor)
-
- <div style="width:100%; padding:10px; float:left;">
-
- <table border=1 width=1100 cellpadding=10>
-
- @if (Model.Contains(1))
- {
- <tr>
- <td colspan="2">
- <div id="header" style="font-family: 'Segoe UI';background-color: black; color: white; text-align: center; padding: 5px;">
- <h1 style="font-family: 'Segoe UI'; color: white; text-align: center;">Bank Brochure</h1>
- </div>
- </td>
- </tr>
- }
- @if (Model.Contains(2))
- {
- <tr>
- <td style="width:4%">
-
- <div id="nav" style="font-family:'Segoe UI';line-height: 30px;background-color: #eeeeee;height: 300px;width: 100px;float: left;padding: 5px;">
- London<br>
- Paris<br>
- Tokyo<br>
- </div>
-
- </td>
-
- <td style="width:96%">
- <div id="section" style="font-family:'Segoe UI';float: left;padding: 10px;color:black">
- <h2>London</h2>
- <p>
- London is the capital city of England. It is the most populous city in the United Kingdom,
- with a metropolitan area of over 13 million inhabitants.
- </p>
- <p>
- Standing on the River Thames, London has been a major settlement for two millennia,
- its history going back to its founding by the Romans, who named it Londinium.
- </p>
- </div>
- </td>
-
- </tr>
-
-
- }
- @if (Model.Contains(3))
- {
- <tr>
- <td colspan="2">
- <div id="footer" style="font-family:'Segoe UI';background-color: black;color: white;clear: both;text-align: center;padding: 5px;">
- Copyright © 2015 Zoo Group , Solution by kelum.
- </div>
- </td>
- </tr>
- }
- </table>
- </div>
-
- </div>
-
-
- }
-
- <br />
- <button id="btn_sumbit" type="submit" class="btn btn-danger submit">Save as PDF</button>
- </body>
- </html>
But once compile above , div tags located outside the RTE ,
Actually I want to load CSHTML divs using controller method but without load whole html( not using this method editor.LoadHtml("~/xx.html")) . how can I load html div sections one by one at controller method