On a side note if that
Mode.Template
is the raw HTML content which you want to write on the browser, then I would follow a different approach,
@Html.Raw(Model.Template)
This would render the HTML content from database, and still follow the MVC semantics and processes of generating Layout and filling the View information. It is not a good approach to go a Response.Write(), in any case. Response.Write was used as alternate to the <% variable %> approach of Classic ASP and sometimes in ASP.NET Web Pages, but in ASP.NET MVC you need to follow the MVC pattern to better make use of the services and features provided in this framework, which are provided by the
@Html
helpers.
how to use @html.raw | The ASP.NET Forums[
^]
Is Response.Write in ASP.NET views a bad idea? - Stack Overflow[
^]
Edit
Quote:
But this renders a very small table on the top left corner of the application , i want to render that html table on the entire screen of view .
You can apply the styling to the table itself as well. But it is still better to follow the semantics. :-)